Adjust code comments to remove topological-sort references

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 <daira@jacaranda.org>
This commit is contained in:
str4d 2021-08-13 00:44:23 +01:00 committed by GitHub
parent 6fdc4def4a
commit fe7abcad14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -7287,7 +7287,7 @@ public:
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);
}
};
@ -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);