mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-06 19:35:04 +00:00
core/tracing: add InvalidEoF hook
This commit is contained in:
parent
d227a8d086
commit
1846cc9ef4
2 changed files with 5 additions and 1 deletions
|
|
@ -491,7 +491,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
|||
// gas for initcode execution is not consumed.
|
||||
// Only intrinsic creation transaction costs are charged.
|
||||
if errors.Is(vmerr, vm.ErrInvalidEOFInitcode) {
|
||||
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1)
|
||||
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1, tracing.NonceChangeInvalidEOF)
|
||||
}
|
||||
} else {
|
||||
// Increment the nonce for the next transaction.
|
||||
|
|
|
|||
|
|
@ -367,4 +367,8 @@ const (
|
|||
// NonceChangeRevert is emitted when the nonce is reverted back to a previous value due to call failure.
|
||||
// It is only emitted when the tracer has opted in to use the journaling wrapper (WrapWithJournal).
|
||||
NonceChangeRevert NonceChangeReason = 6
|
||||
|
||||
// NonceChangeInvalidEOF is emitted when the nonce is changed when a new contract is created,
|
||||
// but the creation fails because of an EOF error.
|
||||
NonceChangeInvalidEOF NonceChangeReason = 6
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue