Skip to content

Commit

Permalink
Merge pull request #188 from ethereumjs/double-callback
Browse files Browse the repository at this point in the history
Avoid double-callbacks in CALL
  • Loading branch information
holgerd77 authored Sep 13, 2017
2 parents bb507be + a17c5d8 commit c85ab76
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/opFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,22 +561,22 @@ module.exports = {
}
}
}
})

try {
checkCallMemCost(runState, options, localOpts)
checkOutOfGas(runState, options)
} catch (e) {
done(e.error)
return
}
try {
checkCallMemCost(runState, options, localOpts)
checkOutOfGas(runState, options)
} catch (e) {
done(e.error)
return
}

if (!value.isZero()) {
runState.gasLeft.iadd(new BN(fees.callStipend.v))
options.gasLimit.iadd(new BN(fees.callStipend.v))
}
if (!value.isZero()) {
runState.gasLeft.iadd(new BN(fees.callStipend.v))
options.gasLimit.iadd(new BN(fees.callStipend.v))
}

makeCall(runState, options, localOpts, done)
makeCall(runState, options, localOpts, done)
})
})
},
CALLCODE: function (gas, toAddress, value, inOffset, inLength, outOffset, outLength, runState, done) {
Expand Down

0 comments on commit c85ab76

Please sign in to comment.