From d465fcd038f7d34a4e73fab436de2148792ad247 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Fri, 7 Sep 2018 17:19:32 +0100 Subject: [PATCH] Appy child computation in call op code --- nimbus/vm/interpreter/opcodes_impl.nim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index f602ab306..fa06768ab 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -699,9 +699,9 @@ template genCall(callName: untyped): untyped = callData = computation.memory.read(memInPos, memInLen) senderBalance = computation.vmState.readOnlyStateDb.getBalance(computation.msg.storageAddress) # TODO check gas balance rollover - # TODO: shouldTransferValue is not set up, should be: - # call, callCode: True - # callDelegate, callStatic: False + # TODO: shouldTransferValue in py-evm is: + # True for call and callCode + # False for callDelegate and callStatic insufficientFunds = senderBalance < value # TODO: and shouldTransferValue stackTooDeep = computation.msg.depth >= MaxCallDepth @@ -740,9 +740,7 @@ template genCall(callName: untyped): untyped = if sender != ZERO_ADDRESS: childMsg.sender = sender - # let childComputation = applyChildBaseComputation(computation, childMsg) - var childComputation: BaseComputation # TODO - stub - new childComputation + var childComputation = applyChildComputation(computation, childMsg) childComputation.gasMeter.init(0) if childComputation.isError: