diff --git a/nimbus/vm/computation.nim b/nimbus/vm/computation.nim index 87d4f870f..3aee3a18b 100644 --- a/nimbus/vm/computation.nim +++ b/nimbus/vm/computation.nim @@ -293,14 +293,9 @@ proc addChildComputation*(c, child: Computation) = child.vmState.touchedAccounts.incl child.msg.contractAddress if child.isError: - if child.shouldBurnGas: - c.returnData = @[] - else: - c.returnData = child.output + c.returnData = child.output else: - if child.msg.isCreate: - c.returnData = @[] - else: + if not child.msg.isCreate: c.returnData = child.output child.touchedAccounts.incl child.msg.contractAddress c.logEntries.add child.logEntries diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index 4cbf592b7..3b386be84 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -561,7 +561,8 @@ proc canTransfer(c: Computation, memPos, memLen: int, value: Uint256, opCode: st c.gasMeter.consumeGas(gasCost, reason = reason) c.memory.extend(memPos, memLen) - + c.returnData.setLen(0) + # the sender is childmsg sender, not parent msg sender # perhaps we need to move this code somewhere else # to avoid confusion