aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authort-bast <bastuc@hotmail.fr>2021-05-11 09:58:13 +0200
committert-bast <bastuc@hotmail.fr>2021-05-11 09:58:13 +0200
commitc30dd02cd893d2bc34779516a13ae7156d3f8ba7 (patch)
tree8dde577c6254bc6769da6705856a9b220bf43c2d /src/wallet/rpcwallet.cpp
parentd2f6d2976f50e7944b1582f022c7ba8dfbc0bfa7 (diff)
downloadbitcoin-c30dd02cd893d2bc34779516a13ae7156d3f8ba7.tar.xz
refactor: remove redundant fOnlySafe argument
The fOnlySafe argument to AvailableCoins is now redundant, since #21359 added a similar field inside the CCoinControl struct. Not all code paths set a CCoinControl instance, but when it's missing we can default to using only safe inputs which is backwards-compatible.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 3f1c1aeab5..7062be6a48 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2970,8 +2970,9 @@ static RPCHelpMan listunspent()
cctl.m_avoid_address_reuse = false;
cctl.m_min_depth = nMinDepth;
cctl.m_max_depth = nMaxDepth;
+ cctl.m_include_unsafe_inputs = include_unsafe;
LOCK(pwallet->cs_wallet);
- pwallet->AvailableCoins(vecOutputs, !include_unsafe, &cctl, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount);
+ pwallet->AvailableCoins(vecOutputs, &cctl, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount);
}
LOCK(pwallet->cs_wallet);