diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-02 03:49:56 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-02 03:49:56 +0800 |
commit | a22056db5988bfa2b1354e0092eabb734c30701c (patch) | |
tree | 3f85f85c7bf80422262c5c521e883aeb358dadc0 /vm/vm_debug.go | |
parent | beb7d35c4033063e4111a51ebf88fabb43bc22b8 (diff) | |
download | dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar.gz dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar.bz2 dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar.lz dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar.xz dexon-a22056db5988bfa2b1354e0092eabb734c30701c.tar.zst dexon-a22056db5988bfa2b1354e0092eabb734c30701c.zip |
Make an attempt to pay for the gas prior to expanding the mem.
Diffstat (limited to 'vm/vm_debug.go')
-rw-r--r-- | vm/vm_debug.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go index b9c1d4bc6..4daa3ab5b 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -277,7 +277,6 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { addStepGasUsage(memGasUsage) - mem.Resize(newMemSize.Uint64()) } } @@ -295,6 +294,8 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { return closure.Return(nil), OOG(gas, tmp) } + mem.Resize(newMemSize.Uint64()) + switch op { // 0x20 range case ADD: |