aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-21 07:12:28 +0800
committerobscuren <geffobscura@gmail.com>2014-05-21 07:12:28 +0800
commit3c35ba7c31423da644c5fb73030af4673cff90ec (patch)
treec8e19b5a16b70780d6d837c3a60a260b13c6fd62 /ethchain/vm.go
parent6ef2832083ad9d1e3cb1895f1aa836517dbf042d (diff)
downloadgo-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar.gz
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar.bz2
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar.lz
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar.xz
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.tar.zst
go-tangerine-3c35ba7c31423da644c5fb73030af4673cff90ec.zip
Fixed state overwriting issue
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r--ethchain/vm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index e732d22a4..c4304e5ac 100644
--- a/ethchain/vm.go
+++ b/ethchain/vm.go
@@ -448,7 +448,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
} else {
stack.Push(ethutil.BigD(addr))
- vm.state.SetStateObject(contract)
+ vm.state.UpdateStateObject(contract)
}
case oCALL:
require(7)
@@ -497,7 +497,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
stack.Push(ethutil.BigTrue)
}
- vm.state.SetStateObject(contract)
+ vm.state.UpdateStateObject(contract)
mem.Set(retOffset.Int64(), retSize.Int64(), ret)
} else {
@@ -515,7 +515,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
receiver := vm.state.GetAccount(stack.Pop().Bytes())
receiver.AddAmount(closure.object.Amount)
- vm.state.SetStateObject(receiver)
+ vm.state.UpdateStateObject(receiver)
closure.object.state.Purge()