doc: add comment to explain correctness of GatherClusters()
This commit is contained in:
1 parent
aba7500a30
commit
b8d279a81c
1 file changed
+3
@@ -957,6 +957,9 @@ std::vector<CTxMemPool::txiter> CTxMemPool::GatherClusters(const std::vector<Txi
|
|||||||
for (auto txid : txids) {
|
for (auto txid : txids) {
|
||||||
auto it = mapTx.find(txid);
|
auto it = mapTx.find(txid);
|
||||||
if (it != mapTx.end()) {
|
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);
|
auto cluster = m_txgraph->GetCluster(*it, TxGraph::Level::MAIN);
|
||||||
if (unique_cluster_representatives.insert(static_cast<const CTxMemPoolEntry*>(&(**cluster.begin()))).second) {
|
if (unique_cluster_representatives.insert(static_cast<const CTxMemPoolEntry*>(&(**cluster.begin()))).second) {
|
||||||
for (auto tx : cluster) {
|
for (auto tx : cluster) {
|
||||||
|
|||||||
Reference in new issue
Block a user