mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 21:04:11 +00:00
Appy child computation in call op code
This commit is contained in:
parent
2a38c0194d
commit
d465fcd038
@ -699,9 +699,9 @@ template genCall(callName: untyped): untyped =
|
|||||||
callData = computation.memory.read(memInPos, memInLen)
|
callData = computation.memory.read(memInPos, memInLen)
|
||||||
senderBalance = computation.vmState.readOnlyStateDb.getBalance(computation.msg.storageAddress)
|
senderBalance = computation.vmState.readOnlyStateDb.getBalance(computation.msg.storageAddress)
|
||||||
# TODO check gas balance rollover
|
# TODO check gas balance rollover
|
||||||
# TODO: shouldTransferValue is not set up, should be:
|
# TODO: shouldTransferValue in py-evm is:
|
||||||
# call, callCode: True
|
# True for call and callCode
|
||||||
# callDelegate, callStatic: False
|
# False for callDelegate and callStatic
|
||||||
insufficientFunds = senderBalance < value # TODO: and shouldTransferValue
|
insufficientFunds = senderBalance < value # TODO: and shouldTransferValue
|
||||||
stackTooDeep = computation.msg.depth >= MaxCallDepth
|
stackTooDeep = computation.msg.depth >= MaxCallDepth
|
||||||
|
|
||||||
@ -740,9 +740,7 @@ template genCall(callName: untyped): untyped =
|
|||||||
if sender != ZERO_ADDRESS:
|
if sender != ZERO_ADDRESS:
|
||||||
childMsg.sender = sender
|
childMsg.sender = sender
|
||||||
|
|
||||||
# let childComputation = applyChildBaseComputation(computation, childMsg)
|
var childComputation = applyChildComputation(computation, childMsg)
|
||||||
var childComputation: BaseComputation # TODO - stub
|
|
||||||
new childComputation
|
|
||||||
childComputation.gasMeter.init(0)
|
childComputation.gasMeter.init(0)
|
||||||
|
|
||||||
if childComputation.isError:
|
if childComputation.isError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user