@@ -349,8 +349,7 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b
349
349
// mempool parents we'd calculate by searching, and it's important that
350
350
// we use the cached notion of ancestor transactions as the set of
351
351
// things to update for removal.
352
- auto ancestors_result{CalculateMemPoolAncestors (entry, Limits::NoLimits (), /* fSearchForParents=*/ false )};
353
- auto ancestors{std::move (ancestors_result).value_or (setEntries{})};
352
+ auto ancestors{AssumeCalculateMemPoolAncestors (__func__, entry, Limits::NoLimits (), /* fSearchForParents=*/ false )};
354
353
// Note that UpdateAncestorsOf severs the child links that point to
355
354
// removeIt in the entries for the parents of removeIt.
356
355
UpdateAncestorsOf (false , removeIt, ancestors);
@@ -703,8 +702,7 @@ void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendhei
703
702
assert (setParentCheck.size () == it->GetMemPoolParentsConst ().size ());
704
703
assert (std::equal (setParentCheck.begin (), setParentCheck.end (), it->GetMemPoolParentsConst ().begin (), comp));
705
704
// Verify ancestor state is correct.
706
- auto ancestors_result{CalculateMemPoolAncestors (*it, Limits::NoLimits ())};
707
- auto ancestors{std::move (ancestors_result).value_or (setEntries{})};
705
+ auto ancestors{AssumeCalculateMemPoolAncestors (__func__, *it, Limits::NoLimits ())};
708
706
uint64_t nCountCheck = ancestors.size () + 1 ;
709
707
uint64_t nSizeCheck = it->GetTxSize ();
710
708
CAmount nFeesCheck = it->GetModifiedFee ();
@@ -865,8 +863,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
865
863
if (it != mapTx.end ()) {
866
864
mapTx.modify (it, [&nFeeDelta](CTxMemPoolEntry& e) { e.UpdateModifiedFee (nFeeDelta); });
867
865
// Now update all ancestors' modified fees with descendants
868
- auto ancestors_result{CalculateMemPoolAncestors (*it, Limits::NoLimits (), /* fSearchForParents=*/ false )};
869
- auto ancestors{std::move (ancestors_result).value_or (setEntries{})};
866
+ auto ancestors{AssumeCalculateMemPoolAncestors (__func__, *it, Limits::NoLimits (), /* fSearchForParents=*/ false )};
870
867
for (txiter ancestorIt : ancestors) {
871
868
mapTx.modify (ancestorIt, [=](CTxMemPoolEntry& e){ e.UpdateDescendantState (0 , nFeeDelta, 0 );});
872
869
}
@@ -1004,8 +1001,7 @@ int CTxMemPool::Expire(std::chrono::seconds time)
1004
1001
1005
1002
void CTxMemPool::addUnchecked (const CTxMemPoolEntry &entry, bool validFeeEstimate)
1006
1003
{
1007
- auto ancestors_result{CalculateMemPoolAncestors (entry, Limits::NoLimits ())};
1008
- auto ancestors{std::move (ancestors_result).value_or (CTxMemPool::setEntries{})};
1004
+ auto ancestors{AssumeCalculateMemPoolAncestors (__func__, entry, Limits::NoLimits ())};
1009
1005
return addUnchecked (entry, ancestors, validFeeEstimate);
1010
1006
}
1011
1007
0 commit comments