diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-10-29 17:52:50 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-10-29 17:55:13 -0400 |
commit | bd93fc9945bfd4be117990c5d861f61ddd451f96 (patch) | |
tree | 28fb70605d9973e1be108de0d4ee22c26d566df7 /src/wallet/wallet.cpp | |
parent | 42b66a6b814bca130a9ccf0a3f747cf33d628232 (diff) | |
download | bitcoin-bd93fc9945bfd4be117990c5d861f61ddd451f96.tar.xz |
Fix change detection of imported internal descriptors
Diffstat (limited to 'src/wallet/wallet.cpp')
-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 6b7d05fdf3..1a30f01027 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4510,7 +4510,7 @@ DescriptorScriptPubKeyMan* CWallet::GetDescriptorScriptPubKeyMan(const WalletDes return nullptr; } -ScriptPubKeyMan* CWallet::AddWalletDescriptor(WalletDescriptor& desc, const FlatSigningProvider& signing_provider, const std::string& label) +ScriptPubKeyMan* CWallet::AddWalletDescriptor(WalletDescriptor& desc, const FlatSigningProvider& signing_provider, const std::string& label, bool internal) { if (!IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { WalletLogPrintf("Cannot add WalletDescriptor to a non-descriptor wallet\n"); @@ -4567,7 +4567,7 @@ ScriptPubKeyMan* CWallet::AddWalletDescriptor(WalletDescriptor& desc, const Flat } CTxDestination dest; - if (ExtractDestination(script_pub_keys.at(0), dest)) { + if (!internal && ExtractDestination(script_pub_keys.at(0), dest)) { SetAddressBook(dest, label, "receive"); } } |