aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2019-04-25 13:50:07 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2019-05-29 18:40:31 +0900
commit27669551da52099e4a6a401acd7aa32b32832423 (patch)
treedb861c209efa4d92deb95b19f69de2b783e548c5 /src/wallet
parent8f2e208f7c0468f9ba92bc789a698281b1c81284 (diff)
wallet: enable avoid_partial_spends by default if avoid_reuse is set
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 237fb2837a..e3080ae96e 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -448,6 +448,8 @@ static UniValue sendtoaddress(const JSONRPCRequest& request)
}
coin_control.m_avoid_address_reuse = GetAvoidReuseFlag(pwallet, request.params[8]);
+ // We also enable partial spend avoidance if reuse avoidance is set.
+ coin_control.m_avoid_partial_spends |= coin_control.m_avoid_address_reuse;
EnsureWalletIsUnlocked(pwallet);