aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/statedb.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r--core/state/statedb.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 3e25e0c16..79cbbaee8 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -51,6 +51,8 @@ type StateDB struct {
txIndex int
logs map[common.Hash]vm.Logs
logSize uint
+
+ reducedDao bool
}
// Create a new state from a given trie
@@ -161,6 +163,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 {