diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-24 06:00:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-24 06:00:50 +0800 |
commit | 1c85d8c66b9db23687b0446b4a7e97e3e61fe188 (patch) | |
tree | 18b53dd3377e082d15185f1cb2c5d255975e0310 /ethchain/vm.go | |
parent | 0651af9dfd701ba09e6c734f21eff85f61454476 (diff) | |
download | go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar.gz go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar.bz2 go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar.lz go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar.xz go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.tar.zst go-tangerine-1c85d8c66b9db23687b0446b4a7e97e3e61fe188.zip |
Minor improvements and bug fixes
* Fixed VM base bug
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r-- | ethchain/vm.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index 90b591f50..7df63b181 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -82,14 +82,15 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro pc := big.NewInt(0) // Current step count step := 0 - // The base for all big integer arithmetic - base := new(big.Int) if ethutil.Config.Debug { ethutil.Config.Log.Debugf("# op\n") } for { + // The base for all big integer arithmetic + base := new(big.Int) + step++ // Get the memory location of pc val := closure.Get(pc) @@ -390,6 +391,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro require(1) loc := stack.Pop() val := closure.GetMem(loc) + fmt.Printf("load %x = %v\n", loc.Bytes(), val.BigInt()) stack.Push(val.BigInt()) case oSSTORE: require(2) |