From 8a3a309fa97bff7252da3e7e8cac47d024d2e281 Mon Sep 17 00:00:00 2001 From: Lessa <230214854+adblesss@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:02:31 -0400 Subject: [PATCH] core/txpool/legacypool: remove redundant nil check in Get (#34092) Leftover from d40a255 when return type changed from *txpool.Transaction to *types.Transaction. --- core/txpool/legacypool/legacypool.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 25c4b13166..d29b71ebc2 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -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.