Skip to content

Commit e592ce4

Browse files
committed
fix bug when a zero-value call creates a new account (homestead)
1 parent d32b8e1 commit e592ce4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/opFns.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,12 @@ module.exports = {
555555
return
556556
}
557557
if (!exists) {
558-
// can't wrap because we are in a callback
559-
runState.gasLeft.isub(new BN(fees.callNewAccountGas.v))
558+
try {
559+
subGas(runState, new BN(fees.callNewAccountGas.v))
560+
} catch (e) {
561+
done(e.error)
562+
return
563+
}
560564
}
561565
makeCall(runState, options, localOpts, done)
562566
})

0 commit comments

Comments
 (0)