From 62c8752b85a1613f66cbe18b85def75abde824b1 Mon Sep 17 00:00:00 2001 From: Fallengirl <155266340+Fallengirl@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:58:40 +0300 Subject: [PATCH] fix: use proper map key check in stateSet.revertTo --- triedb/pathdb/states.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/states.go b/triedb/pathdb/states.go index dc737c3b53..e402f0a3dd 100644 --- a/triedb/pathdb/states.go +++ b/triedb/pathdb/states.go @@ -299,8 +299,8 @@ func (s *stateSet) revertTo(accountOrigin map[common.Hash][]byte, storageOrigin } // Overwrite the storage data with original value blindly for addrHash, storage := range storageOrigin { - slots := s.storageData[addrHash] - if len(slots) == 0 { + slots, ok := s.storageData[addrHash] + if !ok { panic(fmt.Sprintf("non-existent storage set for reverting, %x", addrHash)) } for storageHash, blob := range storage {