Modify node encoding logic for compression

This commit is contained in:
rjl493456442 2025-10-29 09:44:08 +08:00 committed by Gary Rong
parent 0d0c8778a1
commit ce7d7efa2c

View file

@ -651,7 +651,8 @@ func (s *nodeSetWithOrigin) encodeNodeHistory(root common.Hash) (map[common.Hash
encodeFull = true // fallback to the full node encoding encodeFull = true // fallback to the full node encoding
} else { } else {
// Encode the node difference as the history element // Encode the node difference as the history element
blob := encodeNodeCompressed(nElem == 2, diffs, indices) addExt := nElem != 2 // fullNode
blob := encodeNodeCompressed(addExt, diffs, indices)
nodes[owner][path] = blob nodes[owner][path] = blob
} }
} }