mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
Merge bitcoin/bitcoin#24364: refactor: remove duplicate code from BlockAssembler
0f40d65321
refactor: remove duplicate code from BlockAssembler (James O'Beirne) Pull request description: Found while reminding myself how transactions are chosen for blocks. Take it or leave it! ACKs for top commit: glozow: ACK0f40d65321
theStack: Concept and code-review ACK0f40d65321
Tree-SHA512: 8a2694e670ce3fe897ab8f64f64c8df5f8487fc1264527a3abbcba0e5b921fb693416497ccd62508295bc33f202c65556b91b6af463acb91aab43138d2492c14
This commit is contained in:
commit
292f652d53
1 changed files with 2 additions and 6 deletions
|
@ -257,13 +257,9 @@ static int UpdatePackagesForAdded(const CTxMemPool& mempool,
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue