aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coinselection.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-08-01 16:59:50 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-03-06 09:45:40 -0300
commit34f54a0a3a54c59d3f062de69550ab3a3b077ea0 (patch)
treea65abd88a5d4e20383abc9df19a9dcf419556739 /src/wallet/coinselection.h
parent461f0821a2dff0a27f755464b0eb92314fba1acd (diff)
downloadbitcoin-34f54a0a3a54c59d3f062de69550ab3a3b077ea0.tar.xz
wallet: decouple outputs grouping process from each ChooseSelectionResult
Another step towards the single OutputGroups calculation goal
Diffstat (limited to 'src/wallet/coinselection.h')
-rw-r--r--src/wallet/coinselection.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h
index 3ca6520242..6443bc3087 100644
--- a/src/wallet/coinselection.h
+++ b/src/wallet/coinselection.h
@@ -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)