39 const char*
sign{fee_rate < 0 ?
"-" :
""};
int64_t CAmount
Amount in satoshis (Can be negative)
constexpr CAmount COIN
The amount of satoshis in one BTC.
#define Assert(val)
Identity function.
#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. (Rounds down)
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes. (Rounds up)
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
static int sign(const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer, const secp256k1_musig_keyagg_cache *cache, const unsigned char *msg32, unsigned char *sig64)
int64_t EvaluateFeeDown(int32_t at_size) const noexcept
Compute the fee for a given size at_size using this object's feerate, rounding down.
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.