Skip to content

Commit

Permalink
no need to check empty hash
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Nov 27, 2024
1 parent 2808fde commit 25b8eb0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const b4a = require('b4a')

const BitInterlude = require('./bit-interlude')

const empty = b4a.alloc(32)

// this is optimised for speed over mem atm
// can be tweaked in the future

Expand Down Expand Up @@ -117,7 +115,6 @@ async function readAllBlocks (storage) {
async function readAllTreeNodes (storage) {
const nodes = new Map()
for await (const node of storage.createTreeNodeStream()) {
if (node.size === 0 && node.hash.equals(empty)) continue
nodes.set(node.index, node)
}
return nodes
Expand Down

0 comments on commit 25b8eb0

Please sign in to comment.