Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tangerine whistle bugs #312

Merged
merged 4 commits into from
Apr 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix block 2283416 problem
  • Loading branch information
jangko committed Apr 15, 2019
commit 34fd831d6fd2902a674cef6d5ce6003c8159824d
9 changes: 5 additions & 4 deletions nimbus/vm/computation.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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()
Expand Down