Expanded is1559() further into core/state_transition.go
This commit is contained in:
parent
d9de580d74
commit
c0210061c8
@ -290,7 +290,9 @@ func (st *StateTransition) preCheck() error {
|
||||
}
|
||||
|
||||
// Make sure that transaction gasFeeCap is greater than the baseFee (post london)
|
||||
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
|
||||
// begin PluGeth injection
|
||||
if st.evm.ChainConfig().Is1559(st.evm.Context.BlockNumber) {
|
||||
// end PluGeth injection
|
||||
// Skip the checks if gas fields are zero and baseFee was explicitly disabled (eth_call)
|
||||
if !st.evm.Config.NoBaseFee || msg.GasFeeCap.BitLen() > 0 || msg.GasTipCap.BitLen() > 0 {
|
||||
if l := msg.GasFeeCap.BitLen(); l > 256 {
|
||||
@ -433,8 +435,12 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
||||
}
|
||||
effectiveTip := msg.GasPrice
|
||||
if rules.IsLondon {
|
||||
// begin PluGeth injection
|
||||
if st.evm.ChainConfig().Is1559(st.evm.Context.BlockNumber) {
|
||||
// end PluGeth injection
|
||||
effectiveTip = cmath.BigMin(msg.GasTipCap, new(big.Int).Sub(msg.GasFeeCap, st.evm.Context.BaseFee))
|
||||
}
|
||||
}
|
||||
|
||||
if st.evm.Config.NoBaseFee && msg.GasFeeCap.Sign() == 0 && msg.GasTipCap.Sign() == 0 {
|
||||
// Skip fee payment when NoBaseFee is set and the fee fields
|
||||
|
Loading…
Reference in New Issue
Block a user