diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-17 17:24:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-17 17:24:40 +0800 |
commit | 787a61bb27b9f51f4af67c69eb8f1c5869ae3144 (patch) | |
tree | 33405ad345b4350940eb163339c5a5de711bfc6e /core/state/statedb.go | |
parent | 5721fcf668f8ab798b6602dc6ff88726bf0c8f86 (diff) | |
download | go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.gz go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.tar.zst go-tangerine-787a61bb27b9f51f4af67c69eb8f1c5869ae3144.zip |
core/state, core/vm: reworked storage get / set to use common.Hash
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r-- | core/state/statedb.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index 895d9fe8b..1c75ee4db 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -103,13 +103,13 @@ func (self *StateDB) GetCode(addr common.Address) []byte { return nil } -func (self *StateDB) GetState(a common.Address, b common.Hash) []byte { +func (self *StateDB) GetState(a common.Address, b common.Hash) common.Hash { stateObject := self.GetStateObject(a) if stateObject != nil { - return stateObject.GetState(b).Bytes() + return stateObject.GetState(b) } - return nil + return common.Hash{} } func (self *StateDB) IsDeleted(addr common.Address) bool { @@ -145,10 +145,10 @@ func (self *StateDB) SetCode(addr common.Address, code []byte) { } } -func (self *StateDB) SetState(addr common.Address, key common.Hash, value interface{}) { +func (self *StateDB) SetState(addr common.Address, key common.Hash, value common.Hash) { stateObject := self.GetOrNewStateObject(addr) if stateObject != nil { - stateObject.SetState(key, common.NewValue(value)) + stateObject.SetState(key, value) } } |