diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2020-01-08 11:29:48 +1300 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2020-01-08 11:30:10 +1300 |
commit | cab3859a356d1fbce67c45ccaf2b7f233397ae55 (patch) | |
tree | 0053be0393c94379b6d7b6012ca747eeb9224b36 /src | |
parent | 7ea3b85ecf7bcd8933c8e89985fdde9a3c57d7af (diff) | |
parent | e1e1442f3eadc1d139380e71c1b60b86d8d6bdee (diff) |
Merge #17677: Activate watchonly wallet behavior for LegacySPKM only
e1e1442f3eadc1d139380e71c1b60b86d8d6bdee Activate no-privkey -> ISMINE_WATCH_ONLY behavior for LegacySPKM only (Gregory Sanders)
Pull request description:
Slight cleanup following https://github.com/bitcoin/bitcoin/pull/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 e1e1442f3eadc1d139380e71c1b60b86d8d6bdee
Sjors:
Code review ACK e1e1442f3eadc1d139380e71c1b60b86d8d6bdee
meshcollider:
Code review ACK e1e1442f3eadc1d139380e71c1b60b86d8d6bdee
Tree-SHA512: c0a86587d33b8b1646494a5cb0bf8681ee4a88e6913918157746943a0996b501903e0e6ee954cf04154c1e0faee0cbb375c74ca789f46ba9244eb5296632b042
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d3968eaea1..fe6238fc8a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2183,8 +2183,8 @@ std::map<CTxDestination, std::vector<COutput>> CWallet::ListCoins(interfaces::Ch std::vector<COutPoint> 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); |