mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 02:33:28 +01:00
Make MiniMinerMempoolEntry fields private
Follow-up from #27021: accessing of fields in MiniMinerMempoolEntry was done inconsistently. Even though we had a getter, we would directly write to the fields when we needed to update them. This commits sets the fields to private and introduces a method for updating the ancestor information in transactions using the same method name as used for Mempool Entries.
This commit is contained in:
@@ -169,9 +169,8 @@ void MiniMiner::DeleteAncestorPackage(const std::set<MockEntryMap::iterator, Ite
|
||||
for (auto& descendant : it->second) {
|
||||
// If these fail, we must be double-deducting.
|
||||
Assume(descendant->second.GetModFeesWithAncestors() >= anc->second.GetModifiedFee());
|
||||
Assume(descendant->second.vsize_with_ancestors >= anc->second.GetTxSize());
|
||||
descendant->second.fee_with_ancestors -= anc->second.GetModifiedFee();
|
||||
descendant->second.vsize_with_ancestors -= anc->second.GetTxSize();
|
||||
Assume(descendant->second.GetSizeWithAncestors() >= anc->second.GetTxSize());
|
||||
descendant->second.UpdateAncestorState(-anc->second.GetTxSize(), -anc->second.GetModifiedFee());
|
||||
}
|
||||
}
|
||||
// Delete these entries.
|
||||
|
||||
Reference in New Issue
Block a user