From 27669551da52099e4a6a401acd7aa32b32832423 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Thu, 25 Apr 2019 13:50:07 +0900 Subject: [PATCH] wallet: enable avoid_partial_spends by default if avoid_reuse is set --- src/wallet/rpcwallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 237fb2837af..e3080ae96ee 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);