From c8fc416c88c8672ec7323698d01a3204b5de8f29 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 6 Jun 2023 14:19:30 -0400 Subject: [PATCH] Remove legacy mined block cpfp loop, reset stale ancestors --- backend/src/api/blocks.ts | 8 -------- backend/src/api/mempool-blocks.ts | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 9e56db027..71d340d89 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -127,14 +127,6 @@ class Blocks { } } - if (addMempoolData) { - transactions.forEach((tx) => { - if (!tx.cpfpChecked) { - Common.setRelativesAndGetCpfpInfo(tx as MempoolTransactionExtended, mempool); // Child Pay For Parent - } - }); - } - if (!quiet) { logger.debug(`${transactionsFound} of ${txIds.length} found in mempool. ${transactionsFetched} fetched through backend service.`); } diff --git a/backend/src/api/mempool-blocks.ts b/backend/src/api/mempool-blocks.ts index 9b5da8b3b..224e31744 100644 --- a/backend/src/api/mempool-blocks.ts +++ b/backend/src/api/mempool-blocks.ts @@ -358,6 +358,9 @@ class MempoolBlocks { block: blockIndex, vsize: totalVsize + (mempoolTx.vsize / 2), }; + mempoolTx.ancestors = []; + mempoolTx.descendants = []; + mempoolTx.bestDescendant = null; mempoolTx.cpfpChecked = true; // online calculation of stack-of-blocks fee stats