Skip to content

Commit

Permalink
overwrite should always write roots
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Feb 27, 2025
1 parent 47e5f8b commit 90e62e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/session-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ module.exports = class SessionState {
tx.deleteBlockRange(treeLength, this.length)
}

for (const root of roots) {
if (root !== null) tx.putTreeNode(root)
}

// no nodes will be copied in shallow mode
for (const node of nodes) {
if (node !== null) tx.putTreeNode(node)
}
Expand Down

0 comments on commit 90e62e8

Please sign in to comment.