Reduce core mempool tx sync to 8 concurrent requests
This commit is contained in:
		
							parent
							
								
									2a8a403da7
								
							
						
					
					
						commit
						2819cea509
					
				@ -75,7 +75,7 @@ class TransactionUtils {
 | 
			
		||||
 | 
			
		||||
  public async $getMempoolTransactionsExtended(txids: string[], addPrevouts = false, lazyPrevouts = false, forceCore = false): Promise<MempoolTransactionExtended[]> {
 | 
			
		||||
    if (forceCore || config.MEMPOOL.BACKEND !== 'esplora') {
 | 
			
		||||
      const limiter = pLimit(32); // Run 32 requests at a time
 | 
			
		||||
      const limiter = pLimit(8); // Run 8 requests at a time
 | 
			
		||||
      const results = await Promise.allSettled(txids.map(
 | 
			
		||||
        txid => limiter(() => this.$getMempoolTransactionExtended(txid, addPrevouts, lazyPrevouts, forceCore))
 | 
			
		||||
      ));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user