![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac. More...
#include <feerate.h>
Public Member Functions | |
| CFeeRate ()=default | |
| Fee rate of 0 satoshis per 0 vB. | |
| template<std::integral I> | |
| CFeeRate (const I m_feerate_kvb) | |
| CFeeRate (const CAmount &nFeePaid, int32_t virtual_bytes) | |
| Construct a fee rate from a fee in satoshis and a vsize in vB. | |
| CAmount | GetFee (int32_t virtual_bytes) const |
| Return the fee in satoshis for the given vsize in vbytes. | |
| FeePerVSize | GetFeePerVSize () const |
| CAmount | GetFeePerK () const |
| Return the fee in satoshis for a vsize of 1000 vbytes. | |
| CFeeRate & | operator+= (const CFeeRate &a) |
| std::string | ToString (FeeRateFormat fee_rate_format=FeeRateFormat::BTC_KVB) const |
| SERIALIZE_METHODS (CFeeRate, obj) | |
Private Attributes | |
| FeePerVSize | m_feerate |
| Fee rate in sats/vB (satoshis per N virtualbytes). | |
Friends | |
| std::weak_ordering | operator<=> (const CFeeRate &a, const CFeeRate &b) noexcept |
| bool | operator== (const CFeeRate &a, const CFeeRate &b) noexcept |
| CFeeRate | operator* (const CFeeRate &f, int a) |
| CFeeRate | operator* (int a, const CFeeRate &f) |
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
|
default |
Fee rate of 0 satoshis per 0 vB.
|
inlineexplicit |
| CFeeRate::CFeeRate | ( | const CAmount & | nFeePaid, |
| int32_t | virtual_bytes ) |
Construct a fee rate from a fee in satoshis and a vsize in vB.
Passing any virtual_bytes less than or equal to 0 will result in 0 fee rate per 0 size.
Definition at line 11 of file feerate.cpp.
| CAmount CFeeRate::GetFee | ( | int32_t | virtual_bytes | ) | const |
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.
Definition at line 20 of file feerate.cpp.
|
inline |
|
inline |
|
inline |
| std::string CFeeRate::ToString | ( | FeeRateFormat | fee_rate_format = FeeRateFormat::BTC_KVB | ) | const |
Definition at line 29 of file feerate.cpp.
|
private |