fix block 299804 problem
This commit is contained in:
parent
230e1d6fd0
commit
3dd18bd8ec
|
@ -182,7 +182,7 @@ proc applyMessage(computation: var BaseComputation, opCode: static[Op]) =
|
|||
debug "applyMessageAux failed", msg = computation.error.info
|
||||
return
|
||||
|
||||
if computation.gasMeter.gasRemaining <= 0:
|
||||
if computation.gasMeter.gasRemaining < 0:
|
||||
snapshot.commit()
|
||||
return
|
||||
|
||||
|
|
|
@ -700,6 +700,9 @@ template genCall(callName: untyped, opCode: Op): untyped =
|
|||
else:
|
||||
(memOutPos, memOutLen)
|
||||
|
||||
if gas > high(GasInt).u256:
|
||||
raise newException(TypeError, "GasInt Overflow (" & callName.astToStr & ")")
|
||||
|
||||
let (childGasFee, childGasLimit) = computation.gasCosts[opCode].c_handler(
|
||||
value,
|
||||
GasParams(kind: Call,
|
||||
|
@ -742,6 +745,8 @@ template genCall(callName: untyped, opCode: Op): untyped =
|
|||
|
||||
if sender != ZERO_ADDRESS:
|
||||
childMsg.sender = sender
|
||||
else:
|
||||
childMsg.sender = computation.msg.storageAddress
|
||||
|
||||
if opCode == CallCode:
|
||||
childMsg.storageAddress = computation.msg.storageAddress
|
||||
|
|
Loading…
Reference in New Issue