Bitcoin Core
22.99.0
P2P Digital Currency
|
Parameters for one iteration of Coin Selection. More...
#include <coinselection.h>
Public Member Functions | |
CoinSelectionParams (size_t change_output_size, size_t change_spend_size, CFeeRate effective_feerate, CFeeRate long_term_feerate, CFeeRate discard_feerate, size_t tx_noinputs_size, bool avoid_partial) | |
CoinSelectionParams () | |
Public Attributes | |
size_t | change_output_size = 0 |
Size of a change output in bytes, determined by the output type. More... | |
size_t | change_spend_size = 0 |
Size of the input to spend a change output in virtual bytes. More... | |
CAmount | m_change_fee {0} |
Cost of creating the change output. More... | |
CAmount | m_cost_of_change {0} |
Cost of creating the change output + cost of spending the change output in the future. More... | |
CFeeRate | m_effective_feerate |
The targeted feerate of the transaction being built. More... | |
CFeeRate | m_long_term_feerate |
The feerate estimate used to estimate an upper bound on what should be sufficient to spend the change output sometime in the future. More... | |
CFeeRate | m_discard_feerate |
If the cost to spend a change output at the discard feerate exceeds its value, drop it to fees. More... | |
size_t | tx_noinputs_size = 0 |
Size of the transaction before coin selection, consisting of the header and recipient output(s), excluding the inputs and change output(s). More... | |
bool | m_subtract_fee_outputs = false |
Indicate that we are subtracting the fee from outputs. More... | |
bool | m_avoid_partial_spends = false |
When true, always spend all (up to OUTPUT_GROUP_MAX_ENTRIES) or none of the outputs associated with the same address. More... | |
Parameters for one iteration of Coin Selection.
Definition at line 75 of file coinselection.h.
|
inline |
Definition at line 102 of file coinselection.h.
|
inline |
Definition at line 112 of file coinselection.h.
size_t CoinSelectionParams::change_output_size = 0 |
Size of a change output in bytes, determined by the output type.
Definition at line 78 of file coinselection.h.
size_t CoinSelectionParams::change_spend_size = 0 |
Size of the input to spend a change output in virtual bytes.
Definition at line 80 of file coinselection.h.
bool CoinSelectionParams::m_avoid_partial_spends = false |
When true, always spend all (up to OUTPUT_GROUP_MAX_ENTRIES) or none of the outputs associated with the same address.
This helps reduce privacy leaks resulting from address reuse. Dust outputs are not eligible to be added to output groups and thus not considered.
Definition at line 100 of file coinselection.h.
CAmount CoinSelectionParams::m_change_fee {0} |
Cost of creating the change output.
Definition at line 82 of file coinselection.h.
CAmount CoinSelectionParams::m_cost_of_change {0} |
Cost of creating the change output + cost of spending the change output in the future.
Definition at line 84 of file coinselection.h.
CFeeRate CoinSelectionParams::m_discard_feerate |
If the cost to spend a change output at the discard feerate exceeds its value, drop it to fees.
Definition at line 91 of file coinselection.h.
CFeeRate CoinSelectionParams::m_effective_feerate |
The targeted feerate of the transaction being built.
Definition at line 86 of file coinselection.h.
CFeeRate CoinSelectionParams::m_long_term_feerate |
The feerate estimate used to estimate an upper bound on what should be sufficient to spend the change output sometime in the future.
Definition at line 89 of file coinselection.h.
bool CoinSelectionParams::m_subtract_fee_outputs = false |
Indicate that we are subtracting the fee from outputs.
Definition at line 96 of file coinselection.h.
size_t CoinSelectionParams::tx_noinputs_size = 0 |
Size of the transaction before coin selection, consisting of the header and recipient output(s), excluding the inputs and change output(s).
Definition at line 94 of file coinselection.h.