CFeeRate

Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac

Synopsis

Declared in <policy/feerate.h>

class CFeeRate;

Member Functions

NameDescription
CFeeRate [constructor]Constructors
GetFee Return the fee in satoshis for the given vsize in vbytes. If the calculated fee would have fractional satoshis, then the returned fee will always be rounded up to the nearest satoshi.
GetFeePerK Return the fee in satoshis for a vsize of 1000 vbytes
GetFeePerVSize Return the fee rate as a fee/vsize fraction.
ToString Format the fee rate as a human-readable string.
operator+= Add another fee rate to this one.

Friends

NameDescription
operator*Scale a fee rate by an integer factor.
operator*Scale a fee rate by an integer factor.
operator==Test two fee rates for equality by their fee/vsize ratio.
operator<=>Three-way compare two fee rates by their fee/vsize ratio.

Non-Member Functions

NameDescription
ParseFeeRateParse a json number or string, denoting BTC/kvB, into a CFeeRate (sat/kvB). Reject negative values or rates larger than 1BTC/kvB.
wallet::GetDiscardRateReturn the maximum feerate for discarding change.
wallet::GetRequiredFeeRateReturn the minimum required feerate taking into account the minimum relay feerate and user set minimum transaction feerate