fix block 1317742 problem

This commit is contained in:
andri lim 2019-03-13 14:40:44 +07:00 committed by zah
parent 72cebff516
commit f5d6d6bc02
1 changed files with 4 additions and 1 deletions

View File

@ -518,9 +518,12 @@ op create, inline = false, value, startPosition, size:
computation.gasMeter.consumeGas(gasCost, reason = reason)
computation.memory.extend(memPos, len)
# the sender is childmsg sender, not parent msg sender
# perhaps we need to move this code somewhere else
# to avoid confusion
let senderBalance =
computation.vmState.readOnlyStateDb().
getBalance(computation.msg.sender)
getBalance(computation.msg.storageAddress)
if senderBalance < value:
debug "Computation Failure", reason = "Insufficient funds available to transfer", required = computation.msg.value, balance = senderBalance