Skip to content

Commit

Permalink
Implement EIP150.1c (suicide new account cost)
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Oct 24, 2016
1 parent 64368f2 commit 2dd56ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/opFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,12 @@ module.exports = {
cb(err)
return
}

if (runState.enableHomsteadReprice && !toAccount.exists) {
// can't wrap because we are in a callback
runState.gasLeft.isub(new BN(fees.callNewAccountGas.v))
}

var newBalance = new Buffer(new BN(contract.balance).add(new BN(toAccount.balance)).toArray())
async.series([
stateManager.putAccountBalance.bind(stateManager, suicideToAddress, newBalance),
Expand Down

0 comments on commit 2dd56ef

Please sign in to comment.