mirror of https://codeberg.org/pzp/pzp-db.git
remove validateTangle
This commit is contained in:
parent
e0a136065e
commit
0772aa4883
11
lib/index.js
11
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,
|
||||
|
||||
|
|
Loading…
Reference in New Issue