aboutsummaryrefslogtreecommitdiff
path: root/src/node/miner.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-27 15:11:49 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-27 15:11:51 +0200
commit57bf12523cf9d91ffe2a9b8499a5dc58f1be8b29 (patch)
treee3808c00f86ea8a1577a7071742c97c16ac1e192 /src/node/miner.cpp
parent66bb4df4105945b907a81da0886a1206070554e1 (diff)
parent7036cf52aa080d2a63993c2298555252d507dd2f (diff)
Merge bitcoin/bitcoin#24934: refactor, miner: Delete call to UpdatePackagesForAdded at beginning of addPackageTxs
7036cf52aa080d2a63993c2298555252d507dd2f Delete UpdatePackagesForAdded at beginning of addPackageTxs. (KevinMusgrave) Pull request description: In `CreateNewBlock` (in miner.cpp), `inBlock` is cleared before `addPackageTxs`, so `inBlock` will be empty in the first call to `UpdatePackagesForAdded`. I saw this brought up in these [PR review club logs](https://bitcoincore.reviews/24538) and there didn't seem to be a definitive answer for why the call is necessary. There's also an [old PR](https://github.com/bitcoin/bitcoin/pull/10200) where this change was going to be applied, but it got closed. If `addPackageTxs` can be called when `inBlock` is not empty, then maybe a test should be added for that case. All the tests seem to pass with this deletion. ACKs for top commit: glozow: utACK 7036cf52aa080d2a63993c2298555252d507dd2f Tree-SHA512: 9e757b71b9035f68a0c6fef229b8cd83f1bdbe23f05bb02cc1bab8c3c177805b388bceb2bb1f0bce354791ccb29f351a6c51979b96ffe4d9fc6c978f83e36afc
Diffstat (limited to 'src/node/miner.cpp')
-rw-r--r--src/node/miner.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp
index 2464579dd1..01db49d5cf 100644
--- a/src/node/miner.cpp
+++ b/src/node/miner.cpp
@@ -310,10 +310,6 @@ void BlockAssembler::addPackageTxs(int& nPackagesSelected, int& nDescendantsUpda
// Keep track of entries that failed inclusion, to avoid duplicate work
CTxMemPool::setEntries failedTx;
- // Start by adding all descendants of previously added txs to mapModifiedTx
- // and modifying them for their already included ancestors
- UpdatePackagesForAdded(inBlock, mapModifiedTx);
-
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = m_mempool.mapTx.get<ancestor_score>().begin();
CTxMemPool::txiter iter;