diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-12 05:51:26 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-12 05:52:27 +0800 |
commit | 6c9e503eb8d41d331d6a74e69539a06590072190 (patch) | |
tree | b9fd4b7abf20d9a901cd4e0f2dc3d70475cdc527 /vm | |
parent | 75ee3b3f089e703b728bb301cc6b2abe4c111c41 (diff) | |
download | dexon-6c9e503eb8d41d331d6a74e69539a06590072190.tar.gz dexon-6c9e503eb8d41d331d6a74e69539a06590072190.tar.zst dexon-6c9e503eb8d41d331d6a74e69539a06590072190.zip |
Removed all implicit logging. Fixed gas issues and jump errors
Diffstat (limited to 'vm')
-rw-r--r-- | vm/environment.go | 2 | ||||
-rw-r--r-- | vm/vm_debug.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vm/environment.go b/vm/environment.go index dea86c66c..5604989e1 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -20,7 +20,7 @@ type Environment interface { BlockHash() []byte GasLimit() *big.Int Transfer(from, to Account, amount *big.Int) error - AddLog(state.Log) + AddLog(*state.Log) } type Object interface { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 2d34758f5..290eddda4 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -47,6 +47,8 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { if r := recover(); r != nil { self.Endl() + closure.UseGas(closure.Gas) + ret = closure.Return(nil) err = fmt.Errorf("%v", r) @@ -735,7 +737,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { for i := 0; i < n; i++ { topics[i] = stack.Pop().Bytes() } - self.env.AddLog(state.Log{closure.Address(), topics, data}) + self.env.AddLog(&state.Log{closure.Address(), topics, data}) case MLOAD: offset := stack.Pop() val := ethutil.BigD(mem.Get(offset.Int64(), 32)) |