mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 19:37:27 -03:00
Merge #17677: Activate watchonly wallet behavior for LegacySPKM only
e1e1442f3e
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: ACKe1e1442f3e
Sjors: Code review ACKe1e1442f3e
meshcollider: Code review ACKe1e1442f3e
Tree-SHA512: c0a86587d33b8b1646494a5cb0bf8681ee4a88e6913918157746943a0996b501903e0e6ee954cf04154c1e0faee0cbb375c74ca789f46ba9244eb5296632b042
This commit is contained in:
commit
cab3859a35
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue