From ce7d7efa2c67d79f6ced6f8c8fa1f5d0e1bd2e1a Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Wed, 29 Oct 2025 09:44:08 +0800 Subject: [PATCH] Modify node encoding logic for compression --- triedb/pathdb/nodes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/triedb/pathdb/nodes.go b/triedb/pathdb/nodes.go index eeeee07fb3..c09c73e8ef 100644 --- a/triedb/pathdb/nodes.go +++ b/triedb/pathdb/nodes.go @@ -651,7 +651,8 @@ func (s *nodeSetWithOrigin) encodeNodeHistory(root common.Hash) (map[common.Hash encodeFull = true // fallback to the full node encoding } else { // 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 } }