Merge pull request #55 from DeBankDeFi/merge_upstream_v1.11.0

adjust history block pruning logic to mitigate the warning log
This commit is contained in:
cifer76 2023-02-17 20:22:31 +08:00 committed by GitHub
commit 1a24176468
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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