Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
OutputGroup Struct Reference

A group of UTXOs paid to the same output script. More...

#include <coinselection.h>

Collaboration diagram for OutputGroup:
[legend]

Public Member Functions

 OutputGroup ()=default
 OutputGroup (const CoinSelectionParams &params)
void Insert (const std::shared_ptr< COutput > &output, size_t ancestors, size_t cluster_count)
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.
bool m_from_me {true}
 Whether the UTXOs were sent by the wallet to itself.
CAmount m_value {0}
 The total value of the UTXOs in sum.
int m_depth {999}
 The minimum number of confirmations the UTXOs in the group have.
size_t m_ancestors {0}
 The aggregated count of unconfirmed ancestors of all UTXOs in this group.
size_t m_max_cluster_count {0}
 The maximum cluster count of a single UTXO in this output group.
CAmount effective_value {0}
 The value of the UTXOs after deducting the cost of spending them at the effective feerate.
CAmount fee {0}
 The fee to spend these UTXOs at the effective feerate.
CAmount long_term_fee {0}
 The fee to spend these UTXOs at the long term feerate.
CFeeRate m_long_term_feerate {0}
 The feerate for spending a created change output eventually (i.e.
bool m_subtract_fee_outputs {false}
 Indicate that we are subtracting the fee from outputs.
int m_weight {0}
 Total weight of the UTXOs in this group.

Detailed Description

A group of UTXOs paid to the same output script.

Definition at line 228 of file coinselection.h.

Constructor & Destructor Documentation

◆ OutputGroup() [1/2]

◆ OutputGroup() [2/2]

Definition at line 262 of file coinselection.h.

Member Function Documentation

◆ EligibleForSpending()

bool wallet::OutputGroup::EligibleForSpending ( const CoinEligibilityFilter & eligibility_filter) const

Definition at line 782 of file coinselection.cpp.

◆ GetSelectionAmount()

◆ Insert()

void wallet::OutputGroup::Insert ( const std::shared_ptr< COutput > & output,
size_t ancestors,
size_t cluster_count )

Definition at line 755 of file coinselection.cpp.

Member Data Documentation

◆ effective_value

The value of the UTXOs after deducting the cost of spending them at the effective feerate.

Definition at line 246 of file coinselection.h.

◆ fee

The fee to spend these UTXOs at the effective feerate.

Definition at line 248 of file coinselection.h.

◆ long_term_fee

The fee to spend these UTXOs at the long term feerate.

Definition at line 250 of file coinselection.h.

◆ m_ancestors

The aggregated count of unconfirmed ancestors of all UTXOs in this group.

Not deduplicated and may overestimate when ancestors are shared.

Definition at line 242 of file coinselection.h.

◆ m_depth

The minimum number of confirmations the UTXOs in the group have.

Unconfirmed is 0.

Definition at line 239 of file coinselection.h.

◆ m_from_me

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 235 of file coinselection.h.

◆ m_long_term_feerate

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 254 of file coinselection.h.

◆ m_max_cluster_count

The maximum cluster count of a single UTXO in this output group.

Definition at line 244 of file coinselection.h.

◆ m_outputs

std::vector<std::shared_ptr<COutput> > wallet::OutputGroup::m_outputs

The list of UTXOs contained in this output group.

Definition at line 231 of file coinselection.h.

◆ m_subtract_fee_outputs

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 257 of file coinselection.h.

◆ m_value

The total value of the UTXOs in sum.

Definition at line 237 of file coinselection.h.

◆ m_weight

Total weight of the UTXOs in this group.

Definition at line 259 of file coinselection.h.


The documentation for this struct was generated from the following files: