aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/spend.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-03-21 14:19:10 -0400
committerAndrew Chow <achow101-github@achow101.com>2022-04-14 12:40:36 -0400
commit912f1ed181161b0365776cd490b63137aaad708a (patch)
tree40a554a56263010294a661a6f75159e811b94300 /src/wallet/spend.cpp
parentb69fd5eaa99f84b62a49d7c7f48d8cee1227592a (diff)
downloadbitcoin-912f1ed181161b0365776cd490b63137aaad708a.tar.xz
wallet: track which coin selection algorithm produced a SelectionResult
Diffstat (limited to 'src/wallet/spend.cpp')
-rw-r--r--src/wallet/spend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp
index 9e508f3a32..b4b726d4fd 100644
--- a/src/wallet/spend.cpp
+++ b/src/wallet/spend.cpp
@@ -435,7 +435,7 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vec
*/
preset_inputs.Insert(out, /*ancestors=*/ 0, /*descendants=*/ 0, /*positive_only=*/ false);
}
- SelectionResult result(nTargetValue);
+ SelectionResult result(nTargetValue, SelectionAlgorithm::MANUAL);
result.AddInput(preset_inputs);
if (result.GetSelectedValue() < nTargetValue) return std::nullopt;
return result;
@@ -519,7 +519,7 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vec
// permissive CoinEligibilityFilter.
std::optional<SelectionResult> res = [&] {
// Pre-selected inputs already cover the target amount.
- if (value_to_select <= 0) return std::make_optional(SelectionResult(nTargetValue));
+ if (value_to_select <= 0) return std::make_optional(SelectionResult(nTargetValue, SelectionAlgorithm::MANUAL));
// If possible, fund the transaction with confirmed UTXOs only. Prefer at least six
// confirmations on outputs received from other wallets and only spend confirmed change.