mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Update core/state_transition.go
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
4392a1c4e6
commit
995310c2a9
1 changed files with 2 additions and 1 deletions
|
|
@ -515,7 +515,8 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
||||||
ret, _, st.gasRemaining, vmerr = st.evm.Create(sender, msg.Data, st.gasRemaining, value, rules.IsPrague)
|
ret, _, st.gasRemaining, vmerr = st.evm.Create(sender, msg.Data, st.gasRemaining, value, rules.IsPrague)
|
||||||
// Special case for EOF, if the initcode or deployed code is
|
// Special case for EOF, if the initcode or deployed code is
|
||||||
// invalid, the tx is considered valid (so update nonce), but
|
// invalid, the tx is considered valid (so update nonce), but
|
||||||
// is to be treated as an exceptional abort (so burn all gas).
|
// gas for initcode execution is not consumed.
|
||||||
|
// Only intrinsic creation transaction costs are charged.
|
||||||
if errors.Is(vmerr, vm.ErrInvalidEOFInitcode) {
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue