diff --git a/lib/index.js b/lib/index.js index 7d64464..361c357 100644 --- a/lib/index.js +++ b/lib/index.js @@ -404,16 +404,6 @@ exports.init = function initDB(peer, config) { 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() { for (let i = 0; i < recs.length; i++) { const rec = recs[i] @@ -447,7 +437,6 @@ exports.init = function initDB(peer, config) { erase, onRecordAdded, getTangle, - validateTangle, msgs, records,