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.