doc: add comment to explain correctness of GatherClusters()

This commit is contained in:
Suhas Daftuar 2025-11-25 14:32:29 -05:00
parent aba7500a30
commit b8d279a81c

View File

@ -957,6 +957,9 @@ std::vector<CTxMemPool::txiter> CTxMemPool::GatherClusters(const std::vector<Txi
for (auto txid : txids) {
auto it = mapTx.find(txid);
if (it != mapTx.end()) {
// Note that TxGraph::GetCluster will return results in graph
// order, which is deterministic (as long as we are not modifying
// the graph).
auto cluster = m_txgraph->GetCluster(*it, TxGraph::Level::MAIN);
if (unique_cluster_representatives.insert(static_cast<const CTxMemPoolEntry*>(&(**cluster.begin()))).second) {
for (auto tx : cluster) {