From 90344dc27bdaef7afd56c94bf8c78be8d5c7473c Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Thu, 18 Dec 2025 09:03:02 +0100 Subject: [PATCH] core/blockchain: remove useless locking of txLookup Signed-off-by: Csaba Kiraly --- core/blockchain_reader.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/blockchain_reader.go b/core/blockchain_reader.go index 0b9689b8bd..831f59facc 100644 --- a/core/blockchain_reader.go +++ b/core/blockchain_reader.go @@ -329,12 +329,9 @@ func (bc *BlockChain) GetAncestor(hash common.Hash, number, ancestor uint64, max // access altogether. func (bc *BlockChain) HasCanonicalTransaction(hash common.Hash, cacheOnly bool) bool { // Check in memory cache first - bc.txLookupLock.RLock() if _, exist := bc.txLookupCache.Get(hash); exist { - bc.txLookupLock.RUnlock() return true } - bc.txLookupLock.RUnlock() // Fallback to database lookup, without reading the transaction itself if !cacheOnly && rawdb.HasCanonicalTransaction(bc.db, hash) {