This commit is contained in:
Roy Crihfield 2023-04-10 14:58:15 +08:00
parent 49f3d43e46
commit a5a95c2a9f
2 changed files with 13 additions and 19 deletions

View File

@ -154,9 +154,6 @@ func (s *stateObject) GetCommittedState(db StateDatabase, key common.Hash) commo
return s.fakeStorage[key] return s.fakeStorage[key]
} }
// If we have a pending write or clean cached, return that // If we have a pending write or clean cached, return that
if value, pending := s.pendingStorage[key]; pending {
return value
}
if value, cached := s.originStorage[key]; cached { if value, cached := s.originStorage[key]; cached {
return value return value
} }

View File

@ -15,23 +15,20 @@ import (
) )
/* /*
The portions of the EVM we want to leverage only use the following methods: The portions of the EVM we want to leverage only use the following methods
(The rest can be left with panics for now):
GetBalance * Exist
Snapshot * CreateAccount
Exist * GetCodeHash
CreateAccount * AddAddressToAccessList
SubBalance * {Get,Set}Nonce
AddBalance * {Get,Set,Add,Sub}Balance
GetCode * {Get,Set}Code
GetCodeHash * {Get,Set}State
RevertToSnapshot * {Get,Set}TransientState
GetNonce * Snapshot
SetNonce * RevertToSnapshot
AddAddressToAccessList
SetCode
The rest can be left with panics for now
*/ */
var _ vm.StateDB = &StateDB{} var _ vm.StateDB = &StateDB{}