go-ethereum/trie/bintrie
CPerezz f676f04706
trie/bintrie: move dirty+mustRecompute flip into setValue
The invariant "mutating a value slot must mark the stem for re-hash
and re-flush" was enforced by every caller remembering to set both
flags after setValue. Moving the flip into setValue itself makes it
structurally impossible to forget, and drops the duplicate flag-sets
at each callsite.

decodeNode's on-disk load path still writes directly to sn.values
because loaded stems must retain whatever mustRecompute/dirty state
the caller asked for (typically both false).
2026-04-19 22:16:50 +02:00
..
binary_node.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
binary_node_test.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
hashed_node.go trie/bintrie: use type alias for HashedNode 2026-04-18 18:38:37 +02:00
hashed_node_test.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
hasher.go trie/bintrie: revert sha256 helper + parallelHashDepth constant 2026-04-18 18:50:45 +02:00
internal_node.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
internal_node_test.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
iterator.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
iterator_test.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
key_encoding.go trie/bintrie: spec change, big endian hashing of slot key (#34670) 2026-04-13 09:42:37 +02:00
node_ref.go trie/bintrie: make IsEmpty kind-based 2026-04-19 22:15:48 +02:00
node_store.go trie/bintrie: drop unused freeInternals and freeStems 2026-04-19 22:15:01 +02:00
stem_node.go trie/bintrie: move dirty+mustRecompute flip into setValue 2026-04-19 22:16:50 +02:00
stem_node_test.go trie/bintrie: unexport package-internal arena identifiers 2026-04-18 18:49:04 +02:00
store_commit.go trie/bintrie: compute parallelHashDepth once at init 2026-04-19 22:15:23 +02:00
store_ops.go trie/bintrie: move dirty+mustRecompute flip into setValue 2026-04-19 22:16:50 +02:00
trie.go trie/bintrie: reuse path buffer in collectNodes 2026-04-19 08:00:33 +02:00
trie_test.go trie/bintrie: add BenchmarkCollectNodesSparseWrite for allocation tracking 2026-04-18 19:12:55 +02:00