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(FeeRateFormat fee_rate_format=FeeRateFormat::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
@ BTC_KVB
Use BTC/kvB fee rate unit.
@ SAT_VB
Use sat/vB fee rate unit.
const std::string CURRENCY_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).
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.