core: ignore basefee when comparing with pool gasprice in txpool (#24080)

This reverts commit 9489853321.
This commit is contained in:
xwjack 2021-12-17 22:44:57 +08:00 committed by GitHub
parent 2295640ebd
commit 8bbf83e7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -621,9 +621,8 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
if err != nil { if err != nil {
return ErrInvalidSender return ErrInvalidSender
} }
// Drop non-local transactions under our own minimal accepted gas price or tip. // Drop non-local transactions under our own minimal accepted gas price or tip
pendingBaseFee := pool.priced.urgent.baseFee if !local && tx.GasTipCapIntCmp(pool.gasPrice) < 0 {
if !local && tx.EffectiveGasTipIntCmp(pool.gasPrice, pendingBaseFee) < 0 {
return ErrUnderpriced return ErrUnderpriced
} }
// Ensure the transaction adheres to nonce ordering // Ensure the transaction adheres to nonce ordering