From 69341bc95a0a50876546e1f4c603ce0f1c3b196c Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Sun, 30 Nov 2025 00:28:05 +0100 Subject: [PATCH] core/rawdb: simplify HasCanonicalTransaction Signed-off-by: Csaba Kiraly --- core/rawdb/accessors_indexes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/rawdb/accessors_indexes.go b/core/rawdb/accessors_indexes.go index e769d2e9d1..107448a2e2 100644 --- a/core/rawdb/accessors_indexes.go +++ b/core/rawdb/accessors_indexes.go @@ -176,8 +176,7 @@ func findTxInBlockBody(blockbody rlp.RawValue, target common.Hash) (*types.Trans // HasCanonicalTransaction checks whether a specific transaction is in the database. func HasCanonicalTransaction(db ethdb.Reader, hash common.Hash) bool { - blockNumber := ReadTxLookupEntry(db, hash) - return blockNumber != nil + return ReadTxLookupEntry(db, hash) != nil } // ReadCanonicalTransaction retrieves a specific transaction from the database, along