mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-01 11:11:22 +00:00
Merge bitcoin/bitcoin#24364: refactor: remove duplicate code from BlockAssembler
0f40d653218789aa176ca2f844e3222d2ad890a3 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:
ACK 0f40d653218789aa176ca2f844e3222d2ad890a3
theStack:
Concept and code-review ACK 0f40d653218789aa176ca2f844e3222d2ad890a3
Tree-SHA512: 8a2694e670ce3fe897ab8f64f64c8df5f8487fc1264527a3abbcba0e5b921fb693416497ccd62508295bc33f202c65556b91b6af463acb91aab43138d2492c14
This commit is contained in:
commit
292f652d53
@ -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…
x
Reference in New Issue
Block a user