core/txpool/legacypool: remove redundant nil check in Get (#34092)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

Leftover from d40a255 when return type changed from *txpool.Transaction
to *types.Transaction.
This commit is contained in:
Lessa 2026-03-26 09:02:31 -04:00 committed by GitHub
parent 5d0e18f775
commit 8a3a309fa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -998,11 +998,7 @@ func (pool *LegacyPool) Status(hash common.Hash) txpool.TxStatus {
// Get returns a transaction if it is contained in the pool and nil otherwise.
func (pool *LegacyPool) Get(hash common.Hash) *types.Transaction {
tx := pool.get(hash)
if tx == nil {
return nil
}
return tx
return pool.get(hash)
}
// get returns a transaction if it is contained in the pool and nil otherwise.