From 4c8b7f1feb19900ccdd6ae85dff706d35583d8cb Mon Sep 17 00:00:00 2001 From: Lessa <230214854+adblesss@users.noreply.github.com> Date: Thu, 26 Mar 2026 06:23:05 -0400 Subject: [PATCH] core/txpool/legacypool: remove redundant nil check in Get --- 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.