aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2022-02-16 21:17:21 -0500
committerJames O'Beirne <james.obeirne@pm.me>2022-02-16 21:17:21 -0500
commit0f40d653218789aa176ca2f844e3222d2ad890a3 (patch)
treed8cc016a00e75eeb83c00d23dc7ecbb21ed7d965 /src/node
parent587cbca826d7331633a30b5a6cce170e3dbe2612 (diff)
refactor: remove duplicate code from BlockAssembler
Diffstat (limited to 'src/node')
-rw-r--r--src/node/miner.cpp8
1 files 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;