diff --git a/lib/session-state.js b/lib/session-state.js index 449ab669..efbd9af4 100644 --- a/lib/session-state.js +++ b/lib/session-state.js @@ -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) }