diff --git a/backend/src/index-workers/block-summary-worker.ts b/backend/src/index-workers/block-summary-worker.ts index 9ceb7bd88..5e0cea8e1 100644 --- a/backend/src/index-workers/block-summary-worker.ts +++ b/backend/src/index-workers/block-summary-worker.ts @@ -18,20 +18,15 @@ if (parentPort) { } async function indexBlockSummary(hash: string, height: number): Promise { - let txs; - if (config.MEMPOOL.BACKEND === 'esplora') { - txs = (await bitcoinApi.$getTxsForBlock(hash)).map(tx => transactionUtils.extendTransaction(tx)); - } else { - const block = await bitcoinClient.getBlock(hash, 2); - txs = block.tx.map(tx => { - tx.fee = Math.round(tx.fee * 100_000_000); - tx.vout.forEach((vout) => { - vout.value = Math.round(vout.value * 100000000); - }); - tx.vsize = Math.round(tx.weight / 4); // required for backwards compatibility - return tx; + const block = await bitcoinClient.getBlock(hash, 2); + const txs = block.tx.map(tx => { + tx.fee = Math.round(tx.fee * 100_000_000); + tx.vout.forEach((vout) => { + vout.value = Math.round(vout.value * 100000000); }); - } + tx.vsize = Math.round(tx.weight / 4); // required for backwards compatibility + return tx; + }); const cpfpSummary = await blocks.$indexCPFP(hash, height, txs); await blocks.$getStrippedBlockTransactions(hash, true, true, cpfpSummary, height); // This will index the block summary