Tagged wrapper around FeeFrac to avoid unit confusion.
Synopsis
Declared in <util/feefrac.h>
template<typename Tag>
struct FeePerUnit
: FeeFrac
Base Classes
Name |
Description |
Data structure storing a fee and size. |
Member Functions
Name |
Description |
Copy‐assign the fee and size from another FeeFrac. |
|
Compute the fee for a given size |
|
Compute the fee for a given size |
|
Compute the fee for a given size |
|
Check if this is empty (size and fee are 0). |
|
Add fee and size of another FeeFrac to this one. |
|
Subtract fee and size of another FeeFrac from this one. |
Static Member Functions
Name |
Description |
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. |
|
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. |
|
Convert a FeeFrac to a FeePerUnit. |
|
Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. This is a version relying on __int128. |
|
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. |
Data Members
Using Declarations
Name |
Description |
Inherit the FeeFrac constructors. |
Non-Member Functions
Name |
Description |
Sum fee and size. |
|
Subtract both fee and size. |
|
Check if two FeeFrac objects are equal (both same fee and same size). |
|
Swap two FeeFracs. |
Created with MrDocs