mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/state: call finalise before updateRoot
This commit is contained in:
parent
28ed26e330
commit
8297c0d6e2
1 changed files with 4 additions and 2 deletions
|
|
@ -352,9 +352,11 @@ func (s *stateObject) updateTrie() error {
|
|||
}
|
||||
|
||||
// updateRoot flushes all cached storage mutations to trie, recalculating the
|
||||
// new storage trie root. This function assumes all storage mutations have
|
||||
// already been moved to pendingStorage map by finalise.
|
||||
// new storage trie root.
|
||||
func (s *stateObject) updateRoot() {
|
||||
// Make sure all dirty slots are finalized into the pending storage area
|
||||
s.finalise(false)
|
||||
|
||||
// Short circuit if nothing changed, don't bother with hashing anything
|
||||
if len(s.pendingStorage) == 0 {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue