Merge 99a8eb6051 into merged_master (Bitcoin PR #19854)

This commit is contained in:
Andrew Poelstra 2020-11-28 22:40:46 +00:00
commit 08ceba023e
2 changed files with 16 additions and 13 deletions

View file

@ -929,9 +929,9 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
}
void CTxMemPool::ApplyDelta(const uint256 hash, CAmount &nFeeDelta) const
void CTxMemPool::ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const
{
LOCK(cs);
AssertLockHeld(cs);
std::map<uint256, CAmount>::const_iterator pos = mapDeltas.find(hash);
if (pos == mapDeltas.end())
return;
@ -939,9 +939,9 @@ void CTxMemPool::ApplyDelta(const uint256 hash, CAmount &nFeeDelta) const
nFeeDelta += delta;
}
void CTxMemPool::ClearPrioritisation(const uint256 hash)
void CTxMemPool::ClearPrioritisation(const uint256& hash)
{
LOCK(cs);
AssertLockHeld(cs);
mapDeltas.erase(hash);
}
@ -1050,6 +1050,7 @@ void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, bool validFeeEstimat
void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
{
AssertLockHeld(cs);
setEntries s;
if (add && mapLinks[entry].children.insert(child).second) {
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);
@ -1060,6 +1061,7 @@ void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
void CTxMemPool::UpdateParent(txiter entry, txiter parent, bool add)
{
AssertLockHeld(cs);
setEntries s;
if (add && mapLinks[entry].parents.insert(parent).second) {
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);