![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
Tagged wrapper around FeeFrac to avoid unit confusion. More...
#include <feefrac.h>
Public Member Functions | |
constexpr | FeeFrac () noexcept |
Construct an IsEmpty() FeeFrac. More... | |
constexpr | FeeFrac (int64_t f, int32_t s) noexcept |
Construct a FeeFrac with specified fee and size. More... | |
constexpr | FeeFrac (const FeeFrac &) noexcept=default |
![]() | |
constexpr | FeeFrac () noexcept |
Construct an IsEmpty() FeeFrac. More... | |
constexpr | FeeFrac (int64_t f, int32_t s) noexcept |
Construct a FeeFrac with specified fee and size. More... | |
constexpr | FeeFrac (const FeeFrac &) noexcept=default |
constexpr FeeFrac & | operator= (const FeeFrac &) noexcept=default |
bool | IsEmpty () const noexcept |
Check if this is empty (size and fee are 0). More... | |
void | operator+= (const FeeFrac &other) noexcept |
Add fee and size of another FeeFrac to this one. More... | |
void | operator-= (const FeeFrac &other) noexcept |
Subtract fee and size of another FeeFrac from this one. More... | |
template<bool RoundDown> | |
int64_t | EvaluateFee (int32_t at_size) const noexcept |
Compute the fee for a given size at_size using this object's feerate. More... | |
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. More... | |
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. More... | |
Static Public Member Functions | |
static FeePerUnit | FromFeeFrac (const FeeFrac &feefrac) noexcept |
Convert a FeeFrac to a FeePerUnit. More... | |
![]() | |
static std::pair< int64_t, uint32_t > | MulFallback (int64_t a, int32_t b) noexcept |
Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. More... | |
static int64_t | DivFallback (std::pair< int64_t, uint32_t > n, int32_t d, bool round_down) noexcept |
Helper function for 96/32 signed division, rounding towards negative infinity (if round_down) or positive infinity (if !round_down). More... | |
Additional Inherited Members | |
![]() | |
int64_t | fee |
int32_t | size |
![]() | |
static constexpr auto | Mul = MulFallback |
static constexpr auto | Div = DivFallback |
Tagged wrapper around FeeFrac to avoid unit confusion.
|
inlineconstexprnoexcept |
|
inlineconstexprdefaultnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticnoexcept |
Convert a FeeFrac to a FeePerUnit.