[#CTxMemPool-GatherClusters]
= xref:CTxMemPool.adoc[CTxMemPool]::GatherClusters
:relfileprefix: ../
:mrdocs:

Collect the entire cluster of connected transactions for each transaction in txids&period; All txids must correspond to transaction entries in the mempool, otherwise this returns an empty vector&period; This call will also exit early and return an empty vector if it collects 500 or more transactions as a DoS protection&period;

== Synopsis

Declared in `&lt;txmempool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f95135d2ee8), requires&lowbar;capability(0x7f9501b122c8), requires&lowbar;capability(0x7f950ec784b8), requires&lowbar;capability(0x7f9525ea8208), requires&lowbar;capability(0x7f9515097948), requires&lowbar;capability(0x7f950826bbe8), requires&lowbar;capability(0x7f94f856f2f8), requires&lowbar;capability(0x7f9513c594e8)&rsqb;&rsqb;
std::vector&lt;txiter&gt;
GatherClusters(std::vector&lt;Txid&gt; const& txids) const;
----

== Return Value

The iterators of every transaction in the collected clusters, or an empty vector&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *txids*
| The txids whose clusters are collected&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
