fix the issue causing the warning log

This commit is contained in:
cifer76 2023-02-17 20:03:07 +08:00
parent 5a490e98dd
commit ee630b2bac

View file

@ -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()