fix block 512335 problem
This commit is contained in:
parent
d679798abb
commit
9fcba8f90d
|
@ -113,6 +113,8 @@ proc applyMessageAux(computation: var BaseComputation, opCode: static[Op]) =
|
||||||
if computation.msg.depth > STACK_DEPTH_LIMIT:
|
if computation.msg.depth > STACK_DEPTH_LIMIT:
|
||||||
raise newException(StackDepthError, "Stack depth limit reached")
|
raise newException(StackDepthError, "Stack depth limit reached")
|
||||||
|
|
||||||
|
let nilai = computation.vmState.readOnlyStateDb().getBalance(computation.msg.sender)
|
||||||
|
|
||||||
if computation.msg.value != 0:
|
if computation.msg.value != 0:
|
||||||
let senderBalance =
|
let senderBalance =
|
||||||
computation.vmState.readOnlyStateDb().
|
computation.vmState.readOnlyStateDb().
|
||||||
|
@ -174,7 +176,7 @@ proc applyMessage(computation: var BaseComputation, opCode: static[Op]) =
|
||||||
var snapshot = computation.snapshot()
|
var snapshot = computation.snapshot()
|
||||||
defer: snapshot.dispose()
|
defer: snapshot.dispose()
|
||||||
|
|
||||||
when opCode == Call:
|
when opCode in {Call, Create}:
|
||||||
try:
|
try:
|
||||||
computation.applyMessageAux(opCode)
|
computation.applyMessageAux(opCode)
|
||||||
except VMError:
|
except VMError:
|
||||||
|
|
|
@ -748,7 +748,7 @@ template genCall(callName: untyped, opCode: Op): untyped =
|
||||||
else:
|
else:
|
||||||
childMsg.sender = computation.msg.storageAddress
|
childMsg.sender = computation.msg.storageAddress
|
||||||
|
|
||||||
if opCode == CallCode:
|
when opCode == CallCode:
|
||||||
childMsg.storageAddress = computation.msg.storageAddress
|
childMsg.storageAddress = computation.msg.storageAddress
|
||||||
|
|
||||||
var childComputation = applyChildComputation(computation, childMsg, opCode)
|
var childComputation = applyChildComputation(computation, childMsg, opCode)
|
||||||
|
|
Loading…
Reference in New Issue