aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-17 17:30:42 +0800
committerobscuren <geffobscura@gmail.com>2015-06-17 17:30:42 +0800
commit30b27336ea73f7d65c62363047fa37fdd0a54de1 (patch)
tree08aacef7cab2d1b824e96ebef97697bb661f1a08 /core
parent787a61bb27b9f51f4af67c69eb8f1c5869ae3144 (diff)
downloaddexon-30b27336ea73f7d65c62363047fa37fdd0a54de1.tar.gz
dexon-30b27336ea73f7d65c62363047fa37fdd0a54de1.tar.zst
dexon-30b27336ea73f7d65c62363047fa37fdd0a54de1.zip
core/state: remove the need for common.Value
Diffstat (limited to 'core')
-rw-r--r--core/state/state_object.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go
index 42dac632b..1deb9bf02 100644
--- a/core/state/state_object.go
+++ b/core/state/state_object.go
@@ -128,8 +128,10 @@ func (self *StateObject) MarkForDeletion() {
}
}
-func (c *StateObject) getAddr(addr common.Hash) (ret common.Hash) {
- return common.BytesToHash(common.NewValueFromBytes([]byte(c.State.trie.Get(addr[:]))).Bytes())
+func (c *StateObject) getAddr(addr common.Hash) common.Hash {
+ var ret []byte
+ rlp.DecodeBytes(c.State.trie.Get(addr[:]), &ret)
+ return common.BytesToHash(ret)
}
func (c *StateObject) setAddr(addr []byte, value common.Hash) {