core: fix a bug in state transition

This commit is contained in:
Marius van der Wijden 2024-09-26 14:40:56 +02:00
parent ce4a1c51ad
commit 55e2e277bf

View file

@ -441,6 +441,11 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
// - reset transient storage(eip 1153)
st.state.Prepare(rules, msg.From, st.evm.Context.Coinbase, msg.To, vm.ActivePrecompiles(rules), msg.AccessList)
if !contractCreation {
// Increment the nonce for the next transaction
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1)
}
var (
ret []byte
vmerr error // vm errors do not effect consensus and are therefore not assigned to err