core/txpool/legacypool: remove redundant nil check in Get

This commit is contained in:
Lessa 2026-03-26 06:23:05 -04:00 committed by GitHub
parent 5d0e18f775
commit 4c8b7f1feb
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.