aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm_debug.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-23 20:04:00 +0800
committerobscuren <geffobscura@gmail.com>2014-10-23 20:04:00 +0800
commitfeef194829b07570e91873ed5d1e8cc51e8fa430 (patch)
tree7ccb57a57bc538c8ae242fcad95f96218b21862e /vm/vm_debug.go
parent91c876831a3b616beb759c30d705407845ffc3ee (diff)
downloadgo-tangerine-feef194829b07570e91873ed5d1e8cc51e8fa430.tar.gz
go-tangerine-feef194829b07570e91873ed5d1e8cc51e8fa430.tar.zst
go-tangerine-feef194829b07570e91873ed5d1e8cc51e8fa430.zip
Chnged to use GetOp instead & added error + checking
Diffstat (limited to 'vm/vm_debug.go')
-rw-r--r--vm/vm_debug.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index fe004046c..b44604121 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -107,7 +107,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
step++
// Get the memory location of pc
- op = OpCode(closure.Get(pc).Uint())
+ op = closure.GetOp(int(pc.Uint64()))
// XXX Leave this Println intact. Don't change this to the log system.
// Used for creating diffs between implementations
@@ -246,11 +246,11 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
if !closure.UseGas(gas) {
self.Endl()
- err := fmt.Errorf("Insufficient gas for %v. req %v has %v", op, gas, closure.Gas)
+ tmp := new(big.Int).Set(closure.Gas)
closure.UseGas(closure.Gas)
- return closure.Return(nil), err
+ return closure.Return(nil), OOG(gas, tmp)
}
mem.Resize(newMemSize.Uint64())