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>
std::unique_ptr<TxGraph>
MakeTxGraph(
unsigned int max_cluster_count,
uint64_t max_cluster_size,
uint64_t acceptable_cost,
std::function<std::strong_ordering(TxGraph::Ref const&, 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
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. |
Created with MrDocs