mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 22:04:52 +00:00
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
|
debug "applyMessageAux failed", msg = computation.error.info
|
||||||
return
|
return
|
||||||
|
|
||||||
if computation.gasMeter.gasRemaining <= 0:
|
if computation.gasMeter.gasRemaining < 0:
|
||||||
snapshot.commit()
|
snapshot.commit()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -700,6 +700,9 @@ template genCall(callName: untyped, opCode: Op): untyped =
|
|||||||
else:
|
else:
|
||||||
(memOutPos, memOutLen)
|
(memOutPos, memOutLen)
|
||||||
|
|
||||||
|
if gas > high(GasInt).u256:
|
||||||
|
raise newException(TypeError, "GasInt Overflow (" & callName.astToStr & ")")
|
||||||
|
|
||||||
let (childGasFee, childGasLimit) = computation.gasCosts[opCode].c_handler(
|
let (childGasFee, childGasLimit) = computation.gasCosts[opCode].c_handler(
|
||||||
value,
|
value,
|
||||||
GasParams(kind: Call,
|
GasParams(kind: Call,
|
||||||
@ -742,6 +745,8 @@ template genCall(callName: untyped, opCode: Op): untyped =
|
|||||||
|
|
||||||
if sender != ZERO_ADDRESS:
|
if sender != ZERO_ADDRESS:
|
||||||
childMsg.sender = sender
|
childMsg.sender = sender
|
||||||
|
else:
|
||||||
|
childMsg.sender = computation.msg.storageAddress
|
||||||
|
|
||||||
if opCode == CallCode:
|
if opCode == CallCode:
|
||||||
childMsg.storageAddress = computation.msg.storageAddress
|
childMsg.storageAddress = computation.msg.storageAddress
|
||||||
|
Loading…
x
Reference in New Issue
Block a user