minor fix

This commit is contained in:
Sina Mahmoodi 2023-11-13 19:24:27 +03:00
parent f5ac0393e2
commit 23ef9c6ca8

View file

@ -433,7 +433,8 @@ func (s *StateDB) SetStorage(addr common.Address, storage map[common.Hash]common
} }
stateObject := s.GetOrNewStateObject(addr) stateObject := s.GetOrNewStateObject(addr)
// If object was already in memory, it might have cached // If object was already in memory, it might have cached
// storage slots. These should be cleared. // storage slots. These might not be
// overridden in the new storage set and should be cleared.
stateObject.clearStorageCache() stateObject.clearStorageCache()
for k, v := range storage { for k, v := range storage {
stateObject.SetState(k, v) stateObject.SetState(k, v)