[#MakeTxGraph] = MakeTxGraph :mrdocs: Construct a new TxGraph with the specified limit on the number of transactions within a cluster, and on the sum of transaction sizes within a cluster. == Synopsis Declared in `<txgraph.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::unique_ptr<TxGraph> MakeTxGraph( unsigned int max_cluster_count, uint64_t max_cluster_size, uint64_t acceptable_cost, std::function<std::strong_ordering(xref:TxGraph/Ref.adoc[TxGraph::Ref] const&, xref:TxGraph/Ref.adoc[TxGraph::Ref] const&)> const& fallback_order) noexcept; ---- == Description * max_cluster_count cannot exceed MAX_CLUSTER_COUNT_LIMIT. * acceptable_cost controls how much linearization optimization work will be performed per cluster before they are considered to be of acceptable quality. * fallback_order determines how to break tie‐breaks between transactions: fallback_order(a, b) < 0 means a is "better" than b, and will (in case of ties) be placed first. This ordering must be stable over the transactions' lifetimes. == Return Value A new, empty TxGraph configured with the given limits. == Parameters [cols="1,4"] |=== | Name| Description | *max_cluster_count* | Maximum number of transactions per cluster; cannot exceed MAX_CLUSTER_COUNT_LIMIT. | *max_cluster_size* | Maximum sum of transaction sizes within a cluster. | *acceptable_cost* | Amount of linearization optimization work performed per cluster before its quality is considered acceptable. | *fallback_order* | Tie‐break comparator between transactions; must be stable over their lifetimes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#