mirror of
https://github.com/mempool/mempool.git
synced 2024-11-19 18:03:00 +01:00
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…
Reference in New Issue
Block a user