aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-07-31 10:15:25 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2019-07-31 12:11:51 +0200
commit00922b8720278f07a0f6e0e22b6b38356f9ee384 (patch)
treefaa2b2402e807336b2b17eb31f849ddf0511f6fd /src/wallet/rpcwallet.cpp
parent8241b5150431247bc87624804454b1ab8490138c (diff)
parent80ba4241a6773590f6b2c18dae758097b5adc02e (diff)
downloadbitcoin-00922b8720278f07a0f6e0e22b6b38356f9ee384.tar.xz
Merge #15906: [wallet] Move min_depth and max_depth to coin control
80ba4241a6773590f6b2c18dae758097b5adc02e extract min & max depth onto coin control (Amiti Uttarwar) Pull request description: - Refactor `AvailableCoins` to pull min & max depths from coin control. - Add `m_max_depth` to coin control to support this. - Addresses issue https://github.com/bitcoin/bitcoin/issues/15823, see thread for further details. ACKs for top commit: laanwj: ACK 80ba4241a6773590f6b2c18dae758097b5adc02e Tree-SHA512: 8f7c0aa90b3bc3667baf6741b1da2829f3919e1df92ae097d86c6b239f0c024eb410d7100e6251ea8fc49d022fb5a1214bf79b0f8b0014945b7784b2311647d1
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index f95d025815..bf72ef6b16 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2879,9 +2879,11 @@ static UniValue listunspent(const JSONRPCRequest& request)
{
CCoinControl cctl;
cctl.m_avoid_address_reuse = false;
+ cctl.m_min_depth = nMinDepth;
+ cctl.m_max_depth = nMaxDepth;
auto locked_chain = pwallet->chain().lock();
LOCK(pwallet->cs_wallet);
- pwallet->AvailableCoins(*locked_chain, vecOutputs, !include_unsafe, &cctl, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount, nMinDepth, nMaxDepth);
+ pwallet->AvailableCoins(*locked_chain, vecOutputs, !include_unsafe, &cctl, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount);
}
LOCK(pwallet->cs_wallet);