From ee630b2bac49a13527e9a68f094765fa711be8b2 Mon Sep 17 00:00:00 2001 From: cifer76 Date: Fri, 17 Feb 2023 20:03:07 +0800 Subject: [PATCH] fix the issue causing the warning log --- core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index a87cca6fe5..a3c5e6e314 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -460,6 +460,9 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis // Start tx indexer/unindexer if required. if txLookupLimit != nil { bc.txLookupLimit = *txLookupLimit + if bc.cacheConfig.AncientPrune { + bc.txLookupLimit = params.FullImmutabilityThreshold + } bc.wg.Add(1) go bc.maintainTxIndex()