mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-13 18:31:35 +00:00
Master added (via PR #34754) a dirty bool to InternalNode/StemNode plus a CollectNodes short-circuit that skips clean subtrees — the arena branch diverged before that landed. Port the semantics onto the arena shape: - Add dirty bool to InternalNode and StemNode. - Wire dirty=true alongside every existing mustRecompute=true setter in node_store.go (newInternalRef, newStemRef) and store_ops.go (8 mutation sites across InsertSingle/insertSingleInternal/InsertValuesAtStem/ insertValuesAtStem/splitStemInsert/splitStemValuesInsert). - Add 'if !node.dirty { return nil }' gate at the top of CollectNodes for both KindInternal and KindStem; clear dirty after flushfn runs. - Plumb a dirty parameter through deserializeNode; DeserializeNode passes dirty=true (safe default), DeserializeNodeWithHash passes dirty=false (loaded from disk, blob matches). The arena test in trie_test.go that was auto-merged from master used master-shape struct literals (tr.root, NewBinaryNode) that don't exist on arena; delete those and replace with TestCommitSkipCleanSubtrees, an arena-native version that asserts first-Commit flushes all nodes, no-op Commit flushes none, and single-leaf Commit flushes only the root-to-leaf path. |
||
|---|---|---|
| .. | ||
| bintrie | ||
| transitiontrie | ||
| trienode | ||
| bytepool.go | ||
| committer.go | ||
| database_test.go | ||
| encoding.go | ||
| encoding_test.go | ||
| errors.go | ||
| hasher.go | ||
| inspect.go | ||
| inspect_test.go | ||
| iterator.go | ||
| iterator_test.go | ||
| levelstats.go | ||
| levelstats_test.go | ||
| list_hasher.go | ||
| node.go | ||
| node_enc.go | ||
| node_test.go | ||
| proof.go | ||
| proof_test.go | ||
| secure_trie.go | ||
| secure_trie_test.go | ||
| stacktrie.go | ||
| stacktrie_fuzzer_test.go | ||
| stacktrie_test.go | ||
| sync.go | ||
| sync_test.go | ||
| tracer.go | ||
| tracer_test.go | ||
| trie.go | ||
| trie_id.go | ||
| trie_reader.go | ||
| trie_test.go | ||