Skip to content

Commit 21e484f

Browse files
committed
add missing nodes api
1 parent accc9eb commit 21e484f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,11 @@ class Hypercore extends EventEmitter {
969969
return crypto.tree(roots)
970970
}
971971

972+
async missingNodes(index) {
973+
if (this.opened === false) await this.opening
974+
return await MerkleTree.missingNodes(this.core.state, 2 * index, this.core.state.length)
975+
}
976+
972977
async proof(opts) {
973978
if (this.opened === false) await this.opening
974979
const rx = this.state.storage.read()

0 commit comments

Comments
 (0)