From 0772aa48830008b5bcd673cd101252eb164365c6 Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Fri, 26 May 2023 14:20:31 +0300 Subject: [PATCH] remove validateTangle --- lib/index.js | 11 ----------- 1 file changed, 11 deletions(-) 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,