diff options
author | Martin Holst Swende <martin@swende.se> | 2018-08-12 20:47:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-09-18 18:08:32 +0800 |
commit | caa2c23a38141911a570ba098a940b4fdbf0aa88 (patch) | |
tree | df85df9790ac43a17d16b08538eb6c629efb7af7 /core/state/statedb.go | |
parent | 58374e28d95c03d8b0e6d9035c0fb92fad3e865e (diff) | |
download | dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar.gz dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar.bz2 dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar.lz dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar.xz dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.tar.zst dexon-caa2c23a38141911a570ba098a940b4fdbf0aa88.zip |
core,state: finish implementing Eip 1283
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r-- | core/state/statedb.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index d9300012d..515ff57bf 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -255,6 +255,14 @@ func (self *StateDB) GetState(addr common.Address, bhash common.Hash) common.Has return common.Hash{} } +func (self *StateDB) GetStateOriginal(addr common.Address, bhash common.Hash) common.Hash { + stateObject := self.getStateObject(addr) + if stateObject != nil { + return stateObject.GetOriginalStateValue(self.db, bhash) + } + return common.Hash{} +} + // Database retrieves the low level database supporting the lower level trie ops. func (self *StateDB) Database() Database { return self.db |