mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-01 07:35:58 +00:00
core/state: fix storage counters in binary trie IntermediateRoot (#34110)
Add missing `StorageUpdated` and `StorageDeleted` counter increments in the binary trie fast path of `IntermediateRoot()`.
This commit is contained in:
parent
dc3794e3dc
commit
3da517e239
1 changed files with 2 additions and 0 deletions
|
|
@ -879,10 +879,12 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
|
|||
if err := s.trie.UpdateStorage(addr, key[:], common.TrimLeftZeroes(value[:])); err != nil {
|
||||
s.setError(err)
|
||||
}
|
||||
s.StorageUpdated.Add(1)
|
||||
} else {
|
||||
if err := s.trie.DeleteStorage(addr, key[:]); err != nil {
|
||||
s.setError(err)
|
||||
}
|
||||
s.StorageDeleted.Add(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue