remove validateTangle

This commit is contained in:
Andre Staltz 2023-05-26 14:20:31 +03:00
parent e0a136065e
commit 0772aa4883
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 0 additions and 11 deletions

View File

@ -404,16 +404,6 @@ exports.init = function initDB(peer, config) {
return new DBTangle(tangleId, records()) return new DBTangle(tangleId, records())
} }
function validateTangle(tangleId, msgs) {
let err
const tangle = new MsgV2.Tangle(tangleId)
for (const msg of msgs) {
const msgHash = MsgV2.getMsgHash(msg)
if ((err = MsgV2.validate(msg, tangle, msgHash, tangleId))) return err
tangle.add(msgHash, msg)
}
}
function* msgs() { function* msgs() {
for (let i = 0; i < recs.length; i++) { for (let i = 0; i < recs.length; i++) {
const rec = recs[i] const rec = recs[i]
@ -447,7 +437,6 @@ exports.init = function initDB(peer, config) {
erase, erase,
onRecordAdded, onRecordAdded,
getTangle, getTangle,
validateTangle,
msgs, msgs,
records, records,