Bitcoin Core 28.99.0
P2P Digital Currency
|
A group of UTXOs paid to the same output script. More...
#include <coinselection.h>
Public Member Functions | |
OutputGroup ()=default | |
OutputGroup (const CoinSelectionParams ¶ms) | |
void | Insert (const std::shared_ptr< COutput > &output, size_t ancestors, size_t descendants) |
bool | EligibleForSpending (const CoinEligibilityFilter &eligibility_filter) const |
CAmount | GetSelectionAmount () const |
Public Attributes | |
std::vector< std::shared_ptr< COutput > > | m_outputs |
The list of UTXOs contained in this output group. More... | |
bool | m_from_me {true} |
Whether the UTXOs were sent by the wallet to itself. More... | |
CAmount | m_value {0} |
The total value of the UTXOs in sum. More... | |
int | m_depth {999} |
The minimum number of confirmations the UTXOs in the group have. More... | |
size_t | m_ancestors {0} |
The aggregated count of unconfirmed ancestors of all UTXOs in this group. More... | |
size_t | m_descendants {0} |
The maximum count of descendants of a single UTXO in this output group. More... | |
CAmount | effective_value {0} |
The value of the UTXOs after deducting the cost of spending them at the effective feerate. More... | |
CAmount | fee {0} |
The fee to spend these UTXOs at the effective feerate. More... | |
CAmount | long_term_fee {0} |
The fee to spend these UTXOs at the long term feerate. More... | |
CFeeRate | m_long_term_feerate {0} |
The feerate for spending a created change output eventually (i.e. More... | |
bool | m_subtract_fee_outputs {false} |
Indicate that we are subtracting the fee from outputs. More... | |
int | m_weight {0} |
Total weight of the UTXOs in this group. More... | |
A group of UTXOs paid to the same output script.
Definition at line 229 of file coinselection.h.
|
default |
|
inline |
Definition at line 263 of file coinselection.h.
bool wallet::OutputGroup::EligibleForSpending | ( | const CoinEligibilityFilter & | eligibility_filter | ) | const |
Definition at line 783 of file coinselection.cpp.
CAmount wallet::OutputGroup::GetSelectionAmount | ( | ) | const |
void wallet::OutputGroup::Insert | ( | const std::shared_ptr< COutput > & | output, |
size_t | ancestors, | ||
size_t | descendants | ||
) |
CAmount wallet::OutputGroup::effective_value {0} |
The value of the UTXOs after deducting the cost of spending them at the effective feerate.
Definition at line 247 of file coinselection.h.
CAmount wallet::OutputGroup::fee {0} |
The fee to spend these UTXOs at the effective feerate.
Definition at line 249 of file coinselection.h.
CAmount wallet::OutputGroup::long_term_fee {0} |
The fee to spend these UTXOs at the long term feerate.
Definition at line 251 of file coinselection.h.
size_t wallet::OutputGroup::m_ancestors {0} |
The aggregated count of unconfirmed ancestors of all UTXOs in this group.
Not deduplicated and may overestimate when ancestors are shared.
Definition at line 243 of file coinselection.h.
int wallet::OutputGroup::m_depth {999} |
The minimum number of confirmations the UTXOs in the group have.
Unconfirmed is 0.
Definition at line 240 of file coinselection.h.
size_t wallet::OutputGroup::m_descendants {0} |
The maximum count of descendants of a single UTXO in this output group.
Definition at line 245 of file coinselection.h.
bool wallet::OutputGroup::m_from_me {true} |
Whether the UTXOs were sent by the wallet to itself.
This is relevant because we may want at least a certain number of confirmations on UTXOs received from outside wallets while trusting our own UTXOs more.
Definition at line 236 of file coinselection.h.
CFeeRate wallet::OutputGroup::m_long_term_feerate {0} |
The feerate for spending a created change output eventually (i.e.
not urgently, and thus at a lower feerate). Calculated using long term fee estimate. This is used to decide whether it could be economical to create a change output.
Definition at line 255 of file coinselection.h.
std::vector<std::shared_ptr<COutput> > wallet::OutputGroup::m_outputs |
The list of UTXOs contained in this output group.
Definition at line 232 of file coinselection.h.
bool wallet::OutputGroup::m_subtract_fee_outputs {false} |
Indicate that we are subtracting the fee from outputs.
When true, the value that is used for coin selection is the UTXO's real value rather than effective value
Definition at line 258 of file coinselection.h.
CAmount wallet::OutputGroup::m_value {0} |
The total value of the UTXOs in sum.
Definition at line 238 of file coinselection.h.
int wallet::OutputGroup::m_weight {0} |
Total weight of the UTXOs in this group.
Definition at line 260 of file coinselection.h.