aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-11-09 15:10:50 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-11-09 15:14:45 +0100
commit663fd92b28c355cafbc67efb91ad8ec0f41e31d6 (patch)
tree115cdb84476afeceb76c76c81889dac69c70c90b /src/wallet/wallet.cpp
parentf70eb51b05dee30b31f576a69bf110e9ac49c8b8 (diff)
parentbd93fc9945bfd4be117990c5d861f61ddd451f96 (diff)
downloadbitcoin-663fd92b28c355cafbc67efb91ad8ec0f41e31d6.tar.xz
Merge #20266: wallet: fix change detection of imported internal descriptors
bd93fc9945bfd4be117990c5d861f61ddd451f96 Fix change detection of imported internal descriptors (Andrew Chow) Pull request description: Import internal descriptors were having address book entries added which meant they would be detected as non-change. Fix this and add a test for it. ACKs for top commit: laanwj: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96 meshcollider: utACK bd93fc9945bfd4be117990c5d861f61ddd451f96 promag: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96. Tree-SHA512: 8fa9e364be317627ec171eedffdb505976c0e7f1e55bc7e8cfdffa3aeea5db24d231f55166602cd0e97a5ba621acc871de0a765c75d0c65678f83e93c3b657c5
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index d1cde6aa89..bdc9e4fb56 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -4511,7 +4511,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");
@@ -4568,7 +4568,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");
}
}