fix block 2283416 problem

This commit is contained in:
andri lim 2019-04-10 10:11:25 +07:00
parent 3bbe7fede3
commit 34fd831d6f
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 5 additions and 4 deletions

View File

@ -154,10 +154,6 @@ proc writeContract*(computation: BaseComputation, fork: Fork): bool =
result = false
proc transferBalance(computation: BaseComputation, opCode: static[Op]) =
if computation.msg.depth > MaxCallDepth:
computation.setError(&"Stack depth limit reached depth={computation.msg.depth}")
return
let senderBalance = computation.vmState.readOnlyStateDb().
getBalance(computation.msg.sender)
@ -193,6 +189,11 @@ proc postExecuteVM(computation: BaseComputation) =
proc executeOpcodes*(computation: BaseComputation) {.gcsafe.}
proc applyMessage*(computation: BaseComputation, opCode: static[Op]) =
if computation.msg.depth > MaxCallDepth:
computation.setError(&"Stack depth limit reached depth={computation.msg.depth}")
computation.nextProc()
return
computation.snapshot()
defer:
computation.dispose()