Bitcoin Core 30.99.0
P2P Digital Currency
Classes | Functions | Variables
txgraph.h File Reference
#include <compare>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include <util/feefrac.h>
Include dependency graph for txgraph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TxGraph
 Data structure to encapsulate fees, sizes, and dependencies for a set of transactions. More...
 
class  TxGraph::BlockBuilder
 Interface returned by GetBlockBuilder. More...
 
class  TxGraph::Ref
 

Functions

std::unique_ptr< TxGraphMakeTxGraph (unsigned max_cluster_count, uint64_t max_cluster_size, uint64_t acceptable_cost, 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...
 

Variables

static constexpr unsigned MAX_CLUSTER_COUNT_LIMIT {64}
 

Function Documentation

◆ MakeTxGraph()

std::unique_ptr< TxGraph > MakeTxGraph ( unsigned  max_cluster_count,
uint64_t  max_cluster_size,
uint64_t  acceptable_cost,
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_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.

Definition at line 3570 of file txgraph.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ MAX_CLUSTER_COUNT_LIMIT

constexpr unsigned MAX_CLUSTER_COUNT_LIMIT {64}
staticconstexpr

Definition at line 18 of file txgraph.h.