mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
When gob.Decode fails in LoadTransitionState, the function previously
returned nil, which triggered the fallback path that creates a fresh
TransitionState{Ended: isVerkle}. On a verkle-enabled node, this would
incorrectly mark the transition as complete, potentially causing the
node to use BinaryTrie for a partially-transitioned state.
Instead of returning nil, return a non-nil TransitionState with both
Started and Ended set to false. This ensures:
- InTransition() returns false (no partial transition in progress)
- Transitioned() returns false (transition has not completed)
- The fallback path is not triggered, preventing incorrect state
The root hash is also logged in the error message to aid debugging
corruption incidents.
|
||
|---|---|---|
| .. | ||
| state_transition.go | ||