Skip to content

Commit

Permalink
vm -> tangerineWhistle: added spuriousDragon HF separation switch for…
Browse files Browse the repository at this point in the history
… account creation and CREATE nonce increment (EIP-161)
  • Loading branch information
holgerd77 committed Jul 6, 2020
1 parent f15f9d2 commit a2a2354
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vm/lib/evm/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ export default class EVM {
await this._vm._emit('newContract', newContractEvent)

toAccount = await this._state.getAccount(message.to)
toAccount.nonce = new BN(toAccount.nonce).addn(1).toArrayLike(Buffer)
// EIP-161 on account creation and CREATE execution
if (this._vm._common.gteHardfork('spuriousDragon')) {
toAccount.nonce = new BN(toAccount.nonce).addn(1).toArrayLike(Buffer)
}

// Add tx value to the `to` account
let errorMessage
Expand Down

0 comments on commit a2a2354

Please sign in to comment.