From 2819cea50943c079846cb2fdfd225314444b1d07 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sat, 19 Aug 2023 19:02:30 +0900 Subject: [PATCH] Reduce core mempool tx sync to 8 concurrent requests --- backend/src/api/transaction-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/transaction-utils.ts b/backend/src/api/transaction-utils.ts index 00d8c9af3..ef4a34012 100644 --- a/backend/src/api/transaction-utils.ts +++ b/backend/src/api/transaction-utils.ts @@ -75,7 +75,7 @@ class TransactionUtils { public async $getMempoolTransactionsExtended(txids: string[], addPrevouts = false, lazyPrevouts = false, forceCore = false): Promise { 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)) ));