mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
fix: use proper map key check in stateSet.revertTo
This commit is contained in:
parent
a9eaf2ffd8
commit
62c8752b85
1 changed files with 2 additions and 2 deletions
|
|
@ -299,8 +299,8 @@ func (s *stateSet) revertTo(accountOrigin map[common.Hash][]byte, storageOrigin
|
||||||
}
|
}
|
||||||
// Overwrite the storage data with original value blindly
|
// Overwrite the storage data with original value blindly
|
||||||
for addrHash, storage := range storageOrigin {
|
for addrHash, storage := range storageOrigin {
|
||||||
slots := s.storageData[addrHash]
|
slots, ok := s.storageData[addrHash]
|
||||||
if len(slots) == 0 {
|
if !ok {
|
||||||
panic(fmt.Sprintf("non-existent storage set for reverting, %x", addrHash))
|
panic(fmt.Sprintf("non-existent storage set for reverting, %x", addrHash))
|
||||||
}
|
}
|
||||||
for storageHash, blob := range storage {
|
for storageHash, blob := range storage {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue