From e1e1442f3eadc1d139380e71c1b60b86d8d6bdee Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Thu, 5 Dec 2019 11:53:23 -0500 Subject: [PATCH] Activate no-privkey -> ISMINE_WATCH_ONLY behavior for LegacySPKM only --- src/wallet/wallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 647b381b394..2493a5c51e2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2168,8 +2168,8 @@ std::map> CWallet::ListCoins(interfaces::Ch std::vector lockedCoins; ListLockedCoins(lockedCoins); - // Include watch-only for wallets without private keys - const bool include_watch_only = IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); + // Include watch-only for LegacyScriptPubKeyMan wallets without private keys + const bool include_watch_only = GetLegacyScriptPubKeyMan() && IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); const isminetype is_mine_filter = include_watch_only ? ISMINE_WATCH_ONLY : ISMINE_SPENDABLE; for (const COutPoint& output : lockedCoins) { auto it = mapWallet.find(output.hash);