Bitcoin Core 28.99.0
P2P Digital Currency
|
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB. More...
#include <feerate.h>
Public Member Functions | |
CFeeRate () | |
Fee rate of 0 satoshis per kvB. More... | |
template<std::integral I> | |
CFeeRate (const I _nSatoshisPerK) | |
CFeeRate (const CAmount &nFeePaid, uint32_t num_bytes) | |
Construct a fee rate from a fee in satoshis and a vsize in vB. More... | |
CAmount | GetFee (uint32_t num_bytes) const |
Return the fee in satoshis for the given vsize in vbytes. More... | |
CAmount | GetFeePerK () const |
Return the fee in satoshis for a vsize of 1000 vbytes. 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 |
Fee rate in sat/kvB (satoshis per 1000 virtualbytes) More... | |
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) |
CFeeRate | operator* (const CFeeRate &f, int a) |
CFeeRate | operator* (int a, const CFeeRate &f) |
|
inline |
|
inlineexplicit |
CFeeRate::CFeeRate | ( | const CAmount & | nFeePaid, |
uint32_t | num_bytes | ||
) |
Construct a fee rate from a fee in satoshis and a vsize in vB.
param@[in] nFeePaid The fee paid by a transaction, in satoshis param@[in] num_bytes The vsize of a transaction, in vbytes
Definition at line 12 of file feerate.cpp.
CAmount CFeeRate::GetFee | ( | uint32_t | num_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 23 of file feerate.cpp.
|
inline |
std::string CFeeRate::ToString | ( | const FeeEstimateMode & | fee_estimate_mode = FeeEstimateMode::BTC_KVB | ) | const |
|
private |