13 if (virtual_bytes > 0) {
22 Assume(virtual_bytes >= 0);
25 if (nFee == 0 && virtual_bytes != 0 &&
m_feerate.fee < 0)
return CAmount(-1);
32 switch (fee_rate_format) {
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