![]() |
Bitcoin Core
0.21.1
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, size_t nBytes) | |
| Constructor for a fee rate in satoshis per kvB (sat/kvB). More... | |
| CAmount | GetFee (size_t nBytes) 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, |
| size_t | nBytes | ||
| ) |
Constructor for a fee rate in satoshis per kvB (sat/kvB).
The size in bytes must not exceed (2^63 - 1).
Passing an nBytes 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.
| [in] | nFeePaid | CAmount fee rate to construct with |
| [in] | nBytes | size_t bytes (units) to construct with |
Definition at line 10 of file feerate.cpp.
| CAmount CFeeRate::GetFee | ( | size_t | nBytes | ) | 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.8