13 if (virtual_bytes > 0) {
22 Assume(virtual_bytes >= 0);
32 switch (fee_estimate_mode) {
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
#define Assume(val)
Assume is the identity function.
std::string ToString(const FeeEstimateMode &fee_estimate_mode=FeeEstimateMode::BTC_KVB) const
CFeeRate()=default
Fee rate of 0 satoshis per 0 vB.
FeePerVSize m_feerate
Fee rate in sats/vB (satoshis per N virtualbytes)
CAmount GetFeePerK() const
Return the fee in satoshis for a vsize of 1000 vbytes.
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes.
FeePerUnit< VSizeTag > FeePerVSize
const std::string CURRENCY_ATOM
const std::string CURRENCY_UNIT
@ SAT_VB
Use sat/vB fee rate unit.
int64_t EvaluateFeeUp(int32_t at_size) const noexcept
Compute the fee for a given size at_size using this object's feerate, rounding up.
bool IsEmpty() const noexcept
Check if this is empty (size and fee are 0).