Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Enumerations | Functions
fees.h File Reference
#include <attributes.h>
#include <util/expected.h>
#include <util/feefrac.h>
#include <string>
#include <string_view>
#include <utility>
Include dependency graph for fees.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FeeRateEstimation
 A successful fee rate estimate returned by a fee rate estimator. More...
 
struct  FeeRateEstimationError
 A failed fee rate estimation, carrying the zero-value estimation that identifies the estimator and target alongside the error reason. More...
 

Enumerations

enum class  FeeEstimateMode { UNSET , ECONOMICAL , CONSERVATIVE }
 
enum class  FeeReason {
  FEE_RATE_ESTIMATOR , MEMPOOL_MIN , USER_SPECIFIED , FALLBACK ,
  REQUIRED
}
 
enum class  FeeRateEstimatorType { NONE , BLOCK_POLICY , MEMPOOL_POLICY }
 Identifier for fee rate estimator. More...
 

Functions

util::Unexpected< FeeRateEstimationErrorEstimationError (FeeRateEstimatorType estimator, int returned_target, std::string error)
 Build a fee rate estimation error result: a zero-value estimation identifying the estimator and target, alongside the error message. More...
 
const FeeRateEstimationFeeRateEstimationRef (const util::Expected< FeeRateEstimation, FeeRateEstimationError > &result LIFETIMEBOUND)
 Return the estimation carried by a fee rate estimate result: the successful estimation, or the error's zero-value estimation. More...
 
std::string_view FeeRateEstimatorTypeToString (FeeRateEstimatorType feerate_estimator_type)
 
FeeRateEstimatorType FeeRateEstimatorTypeFromString (std::string_view feerate_estimator_type)
 

Enumeration Type Documentation

◆ FeeEstimateMode

enum class FeeEstimateMode
strong
Enumerator
UNSET 

Use default settings based on other criteria.

ECONOMICAL 

Force Fee rate estimator to return non-conservative estimates.

CONSERVATIVE 

Force Fee rate estimator to return conservative estimates.

Definition at line 17 of file fees.h.

◆ FeeRateEstimatorType

enum class FeeRateEstimatorType
strong

Identifier for fee rate estimator.

Enumerator
NONE 
BLOCK_POLICY 
MEMPOOL_POLICY 

Definition at line 36 of file fees.h.

◆ FeeReason

enum class FeeReason
strong
Enumerator
FEE_RATE_ESTIMATOR 
MEMPOOL_MIN 
USER_SPECIFIED 
FALLBACK 
REQUIRED 

Definition at line 24 of file fees.h.

Function Documentation

◆ EstimationError()

util::Unexpected< FeeRateEstimationError > EstimationError ( FeeRateEstimatorType  estimator,
int  returned_target,
std::string  error 
)
inline

Build a fee rate estimation error result: a zero-value estimation identifying the estimator and target, alongside the error message.

Definition at line 78 of file fees.h.

Here is the caller graph for this function:

◆ FeeRateEstimationRef()

const FeeRateEstimation & FeeRateEstimationRef ( const util::Expected< FeeRateEstimation, FeeRateEstimationError > &result  LIFETIMEBOUND)
inline

Return the estimation carried by a fee rate estimate result: the successful estimation, or the error's zero-value estimation.

Definition at line 87 of file fees.h.

Here is the caller graph for this function:

◆ FeeRateEstimatorTypeFromString()

FeeRateEstimatorType FeeRateEstimatorTypeFromString ( std::string_view  feerate_estimator_type)

Definition at line 26 of file fees.cpp.

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

◆ FeeRateEstimatorTypeToString()

std::string_view FeeRateEstimatorTypeToString ( FeeRateEstimatorType  feerate_estimator_type)

Definition at line 12 of file fees.cpp.

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