diff --git a/lib/opFns.js b/lib/opFns.js index 694dbb86d4..1443f64fd5 100644 --- a/lib/opFns.js +++ b/lib/opFns.js @@ -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) {