| 827 | } |
| 828 | |
| 829 | void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta) |
| 830 | { |
| 831 | { |
| 832 | LOCK(cs); |
| 833 | CAmount &delta = mapDeltas[hash]; |
| 834 | delta += nFeeDelta; |
| 835 | txiter it = mapTx.find(hash); |
| 836 | if (it != mapTx.end()) { |
| 837 | mapTx.modify(it, update_fee_delta(delta)); |
| 838 | // Now update all ancestors' modified fees with descendants |
| 839 | setEntries setAncestors; |
| 840 | uint64_t nNoLimit = std::numeric_limits<uint64_t>::max(); |
| 841 | std::string dummy; |
| 842 | CalculateMemPoolAncestors(*it, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy, false); |
| 843 | for (txiter ancestorIt : setAncestors) { |
| 844 | mapTx.modify(ancestorIt, update_descendant_state(0, nFeeDelta, 0)); |
| 845 | } |
| 846 | // Now update all descendants' modified fees with ancestors |
| 847 | setEntries setDescendants; |
| 848 | CalculateDescendants(it, setDescendants); |
| 849 | setDescendants.erase(it); |
| 850 | for (txiter descendantIt : setDescendants) { |
| 851 | mapTx.modify(descendantIt, update_ancestor_state(0, nFeeDelta, 0, 0)); |
| 852 | } |
| 853 | ++nTransactionsUpdated; |
| 854 | } |
| 855 | } |
| 856 | LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta)); |
| 857 | } |
| 858 | |
| 859 | void CTxMemPool::ApplyDelta(const uint256 hash, CAmount &nFeeDelta) const |
| 860 | { |
no test coverage detected