diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-03 18:03:16 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-03 18:03:16 +0800 |
commit | bfed1c7cac98e135ba176c03bd7b4fe51c0dc932 (patch) | |
tree | 2cfd6e9c715d43b9142bf0513c8866f642b84aa2 /ethchain/vm.go | |
parent | d2bc57cd34fe4da3ecec3ff95bc4ef9e74589e5d (diff) | |
download | dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar.gz dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar.bz2 dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar.lz dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar.xz dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.tar.zst dexon-bfed1c7cac98e135ba176c03bd7b4fe51c0dc932.zip |
Trie's are no longer referenced directly but through State instead
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r-- | ethchain/vm.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index c7a91a9c5..7e119ac99 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -330,7 +330,7 @@ out: // Load the value in storage and push it on the stack x := vm.stack.Pop() // decode the object as a big integer - decoder := ethutil.NewValueFromBytes([]byte(contract.State().Get(x.String()))) + decoder := contract.Addr(x.Bytes()) if !decoder.IsNil() { vm.stack.Push(decoder.BigInt()) } else { @@ -375,7 +375,7 @@ out: case oSUICIDE: recAddr := vm.stack.Pop().Bytes() // Purge all memory - deletedMemory := contract.state.NewIterator().Purge() + deletedMemory := contract.state.Purge() // Add refunds to the pop'ed address refund := new(big.Int).Mul(StoreFee, big.NewInt(int64(deletedMemory))) account := state.GetAccount(recAddr) |