![]() |
Bitcoin Core
22.0.0
P2P Digital Currency
|
Fee rate in satoshis per kilobyte: CAmount / kB. More...
#include <feerate.h>
Public Member Functions | |
| CFeeRate () | |
| Fee rate of 0 satoshis per kB. More... | |
| template<typename I > | |
| CFeeRate (const I _nSatoshisPerK) | |
| CFeeRate (const CAmount &nFeePaid, uint32_t num_bytes) | |
| Constructor for a fee rate in satoshis per kvB (sat/kvB). More... | |
| CAmount | GetFee (uint32_t num_bytes) const |
| Return the fee in satoshis for the given size in bytes. More... | |
| CAmount | GetFeePerK () const |
| Return the fee in satoshis for a size of 1000 bytes. More... | |
| CFeeRate & | operator+= (const CFeeRate &a) |
| std::string | ToString (const FeeEstimateMode &fee_estimate_mode=FeeEstimateMode::BTC_KVB) const |
| SERIALIZE_METHODS (CFeeRate, obj) | |
Private Attributes | |
| CAmount | nSatoshisPerK |
Friends | |
| bool | operator< (const CFeeRate &a, const CFeeRate &b) |
| bool | operator> (const CFeeRate &a, const CFeeRate &b) |
| bool | operator== (const CFeeRate &a, const CFeeRate &b) |
| bool | operator<= (const CFeeRate &a, const CFeeRate &b) |
| bool | operator>= (const CFeeRate &a, const CFeeRate &b) |
| bool | operator!= (const CFeeRate &a, const CFeeRate &b) |
|
inline |
|
inlineexplicit |
| CFeeRate::CFeeRate | ( | const CAmount & | nFeePaid, |
| uint32_t | num_bytes | ||
| ) |
Constructor for a fee rate in satoshis per kvB (sat/kvB).
Passing a num_bytes value of COIN (1e8) returns a fee rate in satoshis per vB (sat/vB), e.g. (nFeePaid * 1e8 / 1e3) == (nFeePaid / 1e5), where 1e5 is the ratio to convert from BTC/kvB to sat/vB.
Definition at line 10 of file feerate.cpp.
| CAmount CFeeRate::GetFee | ( | uint32_t | num_bytes | ) | const |
Return the fee in satoshis for the given size in bytes.
Definition at line 21 of file feerate.cpp.
|
inline |
| std::string CFeeRate::ToString | ( | const FeeEstimateMode & | fee_estimate_mode = FeeEstimateMode::BTC_KVB | ) | const |
1.8.14