Skip to content

Commit

Permalink
Adjust code comments to remove topological-sort references
Browse files Browse the repository at this point in the history
There's no point in renaming everything to reflect us not backporting the PR from upstream, but we may as well make the code comments make sense.

Co-authored-by: Daira Hopwood <[email protected]>
  • Loading branch information
str4d and daira authored Aug 12, 2021
1 parent 6fdc4de commit fe7abca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7287,7 +7287,7 @@ class CompareInvMempoolOrder
bool operator()(std::set<uint256>::iterator a, std::set<uint256>::iterator b)
{
/* As std::make_heap produces a max-heap, we want the entries with the
* fewest ancestors/highest fee to sort later. */
* highest feerate to sort later. */
return mp->CompareDepthAndScore(*b, *a);
}
};
Expand Down Expand Up @@ -7488,7 +7488,7 @@ bool SendMessages(const Consensus::Params& params, CNode* pto)
for (std::set<uint256>::iterator it = pto->setInventoryTxToSend.begin(); it != pto->setInventoryTxToSend.end(); it++) {
vInvTx.push_back(it);
}
// Topologically and fee-rate sort the inventory we send for privacy and priority reasons.
// Sort the inventory we send for privacy and priority reasons.
// A heap is used so that not all items need sorting if only a few are being sent.
CompareInvMempoolOrder compareInvMempoolOrder(&mempool);
std::make_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
Expand Down

0 comments on commit fe7abca

Please sign in to comment.