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]
}
// 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 {
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
Snapshot
Exist
CreateAccount
SubBalance
AddBalance
GetCode
GetCodeHash
RevertToSnapshot
GetNonce
SetNonce
AddAddressToAccessList
SetCode
The rest can be left with panics for now
* Exist
* CreateAccount
* GetCodeHash
* AddAddressToAccessList
* {Get,Set}Nonce
* {Get,Set,Add,Sub}Balance
* {Get,Set}Code
* {Get,Set}State
* {Get,Set}TransientState
* Snapshot
* RevertToSnapshot
*/
var _ vm.StateDB = &StateDB{}