Skip to content

Commit eac9d05

Browse files
authored
Modify node encoding logic for compression
1 parent 9413399 commit eac9d05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

triedb/pathdb/nodes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ func (s *nodeSetWithOrigin) encodeNodeHistory(root common.Hash) (map[common.Hash
651651
encodeFull = true // fallback to the full node encoding
652652
} else {
653653
// Encode the node difference as the history element
654-
blob := encodeNodeCompressed(nElem == 2, diffs, indices)
654+
addExt := nElem != 2 // fullNode
655+
blob := encodeNodeCompressed(addExt, diffs, indices)
655656
nodes[owner][path] = blob
656657
}
657658
}

0 commit comments

Comments
 (0)