Bitcoin Core  27.99.0
P2P Digital Currency
Functions
feefrac.cpp File Reference
#include <util/feefrac.h>
#include <algorithm>
#include <array>
#include <vector>
Include dependency graph for feefrac.cpp:

Go to the source code of this file.

Functions

std::vector< FeeFracBuildDiagramFromChunks (const 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 ( const 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: