mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
core: add comment about nonce update order
This commit is contained in:
parent
0f85021cb6
commit
bf01e0d2b6
1 changed files with 3 additions and 1 deletions
|
|
@ -462,7 +462,9 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
||||||
st.state.Prepare(rules, msg.From, st.evm.Context.Coinbase, msg.To, vm.ActivePrecompiles(rules), msg.AccessList)
|
st.state.Prepare(rules, msg.From, st.evm.Context.Coinbase, msg.To, vm.ActivePrecompiles(rules), msg.AccessList)
|
||||||
|
|
||||||
if !contractCreation {
|
if !contractCreation {
|
||||||
// Increment the nonce for the next transaction
|
// Increment the nonce for the next transaction.
|
||||||
|
// Note: EIP-7702 authorizations can also modify the nonce. We perform
|
||||||
|
// this update first to ensure correct validation of authorization nonces.
|
||||||
st.state.SetNonce(msg.From, st.state.GetNonce(msg.From)+1)
|
st.state.SetNonce(msg.From, st.state.GetNonce(msg.From)+1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue