mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Bugfix: ancestor modifed fees were incorrect for descendants
If prioritisetransaction was called for a tx with in-mempool descendants, the modified ancestor fee values for those descendants was incorrect.
This commit is contained in:
parent
ba7dd8bf6f
commit
9bef02e365
@ -912,6 +912,13 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
|
|||||||
BOOST_FOREACH(txiter ancestorIt, setAncestors) {
|
BOOST_FOREACH(txiter ancestorIt, setAncestors) {
|
||||||
mapTx.modify(ancestorIt, update_descendant_state(0, nFeeDelta, 0));
|
mapTx.modify(ancestorIt, update_descendant_state(0, nFeeDelta, 0));
|
||||||
}
|
}
|
||||||
|
// Now update all descendants' modified fees with ancestors
|
||||||
|
setEntries setDescendants;
|
||||||
|
CalculateDescendants(it, setDescendants);
|
||||||
|
setDescendants.erase(it);
|
||||||
|
BOOST_FOREACH(txiter descendantIt, setDescendants) {
|
||||||
|
mapTx.modify(descendantIt, update_ancestor_state(0, nFeeDelta, 0, 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
|
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
|
||||||
|
Loading…
Reference in New Issue
Block a user