Skip to content

Commit cab3859

Browse files
committed
Merge #17677: Activate watchonly wallet behavior for LegacySPKM only
e1e1442 Activate no-privkey -> ISMINE_WATCH_ONLY behavior for LegacySPKM only (Gregory Sanders) Pull request description: Slight cleanup following bitcoin/bitcoin#16944 This should allow future scriptpubkeymans to transparently work, since the current plan is to have ismine always be spendable. ACKs for top commit: achow101: ACK e1e1442 Sjors: Code review ACK e1e1442 meshcollider: Code review ACK e1e1442 Tree-SHA512: c0a86587d33b8b1646494a5cb0bf8681ee4a88e6913918157746943a0996b501903e0e6ee954cf04154c1e0faee0cbb375c74ca789f46ba9244eb5296632b042
2 parents 7ea3b85 + e1e1442 commit cab3859

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,8 +2183,8 @@ std::map<CTxDestination, std::vector<COutput>> CWallet::ListCoins(interfaces::Ch
21832183

21842184
std::vector<COutPoint> lockedCoins;
21852185
ListLockedCoins(lockedCoins);
2186-
// Include watch-only for wallets without private keys
2187-
const bool include_watch_only = IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS);
2186+
// Include watch-only for LegacyScriptPubKeyMan wallets without private keys
2187+
const bool include_watch_only = GetLegacyScriptPubKeyMan() && IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS);
21882188
const isminetype is_mine_filter = include_watch_only ? ISMINE_WATCH_ONLY : ISMINE_SPENDABLE;
21892189
for (const COutPoint& output : lockedCoins) {
21902190
auto it = mapWallet.find(output.hash);

0 commit comments

Comments
 (0)