aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coinselection.h
diff options
context:
space:
mode:
authorS3RK <1466284+s3rk@users.noreply.github.com>2022-11-29 19:40:40 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-12-02 12:39:15 -0300
commit3282fad59908da328f8323e1213344fe58ccf69e (patch)
tree1b4617d78a0fb72b0727e8b4c733540d7e1a0323 /src/wallet/coinselection.h
parentc4e3b7d6a154e82cdb902fd7bcb7b725aebde5ea (diff)
downloadbitcoin-3282fad59908da328f8323e1213344fe58ccf69e.tar.xz
wallet: add assert to SelectionResult::Merge for safety
Diffstat (limited to 'src/wallet/coinselection.h')
-rw-r--r--src/wallet/coinselection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h
index b02e006435..2ab4061a9b 100644
--- a/src/wallet/coinselection.h
+++ b/src/wallet/coinselection.h
@@ -316,6 +316,12 @@ public:
void ComputeAndSetWaste(const CAmount min_viable_change, const CAmount change_cost, const CAmount change_fee);
[[nodiscard]] CAmount GetWaste() const;
+ /**
+ * Combines the @param[in] other selection result into 'this' selection result.
+ *
+ * Important note:
+ * There must be no shared 'COutput' among the two selection results being combined.
+ */
void Merge(const SelectionResult& other);
/** Get m_selected_inputs */