diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-05-13 20:30:26 +1200 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-05-13 21:05:55 +1200 |
commit | 386ba92e836387302eb2005b816dd9f972cdb5bc (patch) | |
tree | 0c741075a2f0e36e665dd1cab0915d1bd81c3ddb /src/wallet/rpcwallet.cpp | |
parent | db2990d01f3c0ade2c786b182dd49a9307d1cfbc (diff) | |
parent | c30dd02cd893d2bc34779516a13ae7156d3f8ba7 (diff) |
Merge bitcoin/bitcoin#21910: refactor: remove redundant fOnlySafe argument
c30dd02cd893d2bc34779516a13ae7156d3f8ba7 refactor: remove redundant fOnlySafe argument (t-bast)
Pull request description:
The `fOnlySafe` argument to `AvailableCoins` is now redundant, since #21359 added a similar field inside the `CCoinControl` struct (see https://github.com/bitcoin/bitcoin/pull/21359#discussion_r591578684).
Not all code paths create a `CCoinControl` instance, but when it's missing we can default to using only safe inputs which is backwards-compatible.
ACKs for top commit:
instagibbs:
utACK c30dd02cd893d2bc34779516a13ae7156d3f8ba7
promag:
Code review ACK c30dd02cd893d2bc34779516a13ae7156d3f8ba7.
achow101:
ACK c30dd02cd893d2bc34779516a13ae7156d3f8ba7
meshcollider:
Code review + test run ACK c30dd02cd893d2bc34779516a13ae7156d3f8ba7
Tree-SHA512: af3cb598d06f233fc48a7c9c45bb14da92b5cf4168b8dbd4f134dc3e0c2b615c6590238ddb1eaf380aea5bbdd3386d2ac8ecd7d22dfc93579adc39248542839b
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 326e183a7f..5567d183b6 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); |