mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
wallet: decouple outputs grouping process from each ChooseSelectionResult
Another step towards the single OutputGroups calculation goal
This commit is contained in:
@@ -242,6 +242,13 @@ struct OutputGroup
|
||||
CAmount GetSelectionAmount() const;
|
||||
};
|
||||
|
||||
struct Groups {
|
||||
// Stores 'OutputGroup' containing only positive UTXOs (value > 0).
|
||||
std::vector<OutputGroup> positive_group;
|
||||
// Stores 'OutputGroup' which may contain both positive and negative UTXOs.
|
||||
std::vector<OutputGroup> mixed_group;
|
||||
};
|
||||
|
||||
/** Compute the waste for this result given the cost of change
|
||||
* and the opportunity cost of spending these inputs now vs in the future.
|
||||
* If change exists, waste = change_cost + inputs * (effective_feerate - long_term_feerate)
|
||||
|
||||
Reference in New Issue
Block a user