Skip to content

Commit

Permalink
upstream alpha7
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx committed Dec 20, 2024
1 parent 17dd1d4 commit 2f700f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
types2 "github.com/ledgerwatch/erigon-lib/types"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/core/types"
"math"

cmath "github.com/ledgerwatch/erigon/common/math"
"github.com/ledgerwatch/erigon/common/u256"
Expand Down Expand Up @@ -368,8 +369,13 @@ func (st *StateTransition) TransitionDb(refunds bool, gasBailout bool) (*Executi
gasBailout = true
}

var skipCheck bool
if st.evm.ChainConfig().Parlia != nil && st.msg.Gas() == math.MaxUint64/2 && st.msg.From() == coinbase {
skipCheck = true
}

// Check clauses 1-3 and 6, buy gas if everything is correct
if err := st.preCheck(gasBailout); err != nil {
if err := st.preCheck(gasBailout || skipCheck); err != nil {
return nil, err
}
if st.evm.Config().Debug {
Expand Down

0 comments on commit 2f700f7

Please sign in to comment.