mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 10:41:08 +00:00
doc: add comment to explain correctness of GatherClusters()
This commit is contained in:
parent
aba7500a30
commit
b8d279a81c
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user