Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Functions
feefrac.h File Reference
#include <stdint.h>
#include <compare>
#include <vector>
#include <span.h>
#include <util/check.h>
Include dependency graph for feefrac.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FeeFrac
 Data structure storing a fee and size, ordered by increasing fee/size. More...
 

Functions

std::vector< FeeFracBuildDiagramFromChunks (Span< const FeeFrac > chunks)
 Takes the pre-computed and topologically-valid chunks and generates a fee diagram which starts at FeeFrac of (0, 0) More...
 
std::partial_ordering CompareFeerateDiagram (Span< const FeeFrac > dia0, Span< const FeeFrac > dia1)
 Compares two feerate diagrams. More...
 

Function Documentation

◆ BuildDiagramFromChunks()

std::vector<FeeFrac> BuildDiagramFromChunks ( Span< const FeeFrac chunks)

Takes the pre-computed and topologically-valid chunks and generates a fee diagram which starts at FeeFrac of (0, 0)

Definition at line 10 of file feefrac.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompareFeerateDiagram()

std::partial_ordering CompareFeerateDiagram ( Span< const FeeFrac dia0,
Span< const FeeFrac dia1 
)

Compares two feerate diagrams.

The shorter one is implicitly extended with a horizontal straight line.

A feerate diagram consists of a list of (fee, size) points with the property that size is strictly increasing and that the first entry is (0, 0).

Array to allow indexed access to input diagrams.

How many elements we have processed in each input.

Whether the corresponding input is strictly better than the other at least in one place.

Get the first unprocessed point in diagram number dia.

Get the last processed point in diagram number dia.

Definition at line 22 of file feefrac.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: