Bitcoin Core 30.99.0
P2P Digital Currency
Functions
txgraph.cpp File Reference
#include <txgraph.h>
#include <cluster_linearize.h>
#include <random.h>
#include <util/bitset.h>
#include <util/check.h>
#include <util/feefrac.h>
#include <util/vector.h>
#include <compare>
#include <functional>
#include <memory>
#include <set>
#include <span>
#include <unordered_set>
#include <utility>
Include dependency graph for txgraph.cpp:

Go to the source code of this file.

Functions

std::unique_ptr< TxGraphMakeTxGraph (unsigned max_cluster_count, uint64_t max_cluster_size, uint64_t acceptable_iters, const std::function< std::strong_ordering(const TxGraph::Ref &, const TxGraph::Ref &)> &fallback_order) noexcept
 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. More...
 

Function Documentation

◆ MakeTxGraph()

std::unique_ptr< TxGraph > MakeTxGraph ( unsigned  max_cluster_count,
uint64_t  max_cluster_size,
uint64_t  acceptable_iters,
const std::function< std::strong_ordering(const TxGraph::Ref &, const TxGraph::Ref &)> &  fallback_order 
)
noexcept

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.

  • max_cluster_count cannot exceed MAX_CLUSTER_COUNT_LIMIT.
  • acceptable_iters controls how many linearization optimization steps 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.

Definition at line 3565 of file txgraph.cpp.

Here is the caller graph for this function: