From 0f40d653218789aa176ca2f844e3222d2ad890a3 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Wed, 16 Feb 2022 21:17:21 -0500 Subject: refactor: remove duplicate code from BlockAssembler --- src/node/miner.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 6e9bde84d8..303738db4b 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -266,13 +266,9 @@ int BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& already modtxiter mit = mapModifiedTx.find(desc); if (mit == mapModifiedTx.end()) { CTxMemPoolModifiedEntry modEntry(desc); - modEntry.nSizeWithAncestors -= it->GetTxSize(); - modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); - modEntry.nSigOpCostWithAncestors -= it->GetSigOpCost(); - mapModifiedTx.insert(modEntry); - } else { - mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); + mit = mapModifiedTx.insert(modEntry).first; } + mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); } } return nDescendantsUpdated; -- cgit v1.2.3