Data structure storing a fee and size.
Declared in <util/feefrac.h>
struct FeeFrac;
The size of a FeeFrac cannot be zero unless the fee is also zero.
| Name | Description |
|---|---|
FeeFrac [constructor] | Constructors |
operator= | Copy-assign the fee and size from another FeeFrac. |
EvaluateFee | Compute the fee for a given size at_size using this object's feerate. |
EvaluateFeeDown | Compute the fee for a given size at_size using this object's feerate, rounding down. |
EvaluateFeeUp | Compute the fee for a given size at_size using this object's feerate, rounding up. |
IsEmpty | Check if this is empty (size and fee are 0). |
operator+= | Add fee and size of another FeeFrac to this one. |
operator-= | Subtract fee and size of another FeeFrac from this one. |
| Name | Description |
|---|---|
Div | Helper function for 96/32 signed division, rounding towards negative infinity (if round_down), or towards positive infinity (if !round_down). This is a version relying on __int128. |
DivFallback | Helper function for 96/32 signed division, rounding towards negative infinity (if round_down) or positive infinity (if !round_down). This is a fallback version, separate so that it can be tested on platforms where it isn't actually needed. |
Mul | Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. This is a version relying on __int128. |
MulFallback | Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. This is a fallback version, separate so it can be tested on platforms where it isn't actually needed. |
| Name | Description |
|---|---|
fee | The fee, in satoshis. |
size | The size, in the unit chosen by the caller (for example vbytes or weight units). |
| Name | Description |
|---|---|
swap | Swap two FeeFracs. |
operator== | Check if two FeeFrac objects are equal (both same fee and same size). |
operator- | Subtract both fee and size. |
operator+ | Sum fee and size. |
| Name | Description |
|---|---|
cluster_linearize::ChunkLinearization | Compute the feerates of the chunks of linearization. Identical to ChunkLinearizationInfo, but only returns the chunk feerates, not the corresponding transaction sets. |
| Name | Description |
|---|---|
FeePerUnit | Tagged wrapper around FeeFrac to avoid unit confusion. |