aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-24 18:09:36 +0800
committerGitHub <noreply@github.com>2016-06-24 18:09:36 +0800
commit848dec3da2dae77ef50ea229cf430ff0171766ed (patch)
tree06f7458835408f94116572d13d1bf0bf48b278f3 /core/state
parentae0880997b7427d6f19fb8501b37f0168623f0c8 (diff)
parentba784bdf36f2daf7827ec1ec864f3393ba8d86a0 (diff)
downloaddexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar.gz
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar.bz2
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar.lz
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar.xz
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.tar.zst
dexon-848dec3da2dae77ef50ea229cf430ff0171766ed.zip
Merge pull request #2725 from karalabe/obscuren-softfork-dao-2
DAO soft-fork
Diffstat (limited to 'core/state')
-rw-r--r--core/state/statedb.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 3e25e0c16..be1960f9e 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -161,6 +161,14 @@ func (self *StateDB) GetCode(addr common.Address) []byte {
return nil
}
+func (self *StateDB) GetCodeHash(addr common.Address) common.Hash {
+ stateObject := self.GetStateObject(addr)
+ if stateObject != nil {
+ return common.BytesToHash(stateObject.codeHash)
+ }
+ return common.Hash{}
+}
+
func (self *StateDB) GetState(a common.Address, b common.Hash) common.Hash {
stateObject := self.GetStateObject(a)
if stateObject != nil {