aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2015-06-10 00:03:08 -0700
committerMatt Corallo <[email protected]>2015-07-20 16:01:37 -0700
commitcfc3dd34284357262bcc7eef2714a210891276c0 (patch)
tree5f1ccca3a6dc5a01e1a25d161903586d8b5112ea /src/wallet/wallet.cpp
parentMerge pull request #6408 (diff)
downloaddiscoin-cfc3dd34284357262bcc7eef2714a210891276c0.tar.xz
discoin-cfc3dd34284357262bcc7eef2714a210891276c0.zip
Also remove pay-2-pubkey from watch when adding a priv key
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 7b3cd9803..c11800863 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -108,6 +108,9 @@ bool CWallet::AddKeyPubKey(const CKey& secret, const CPubKey &pubkey)
script = GetScriptForDestination(pubkey.GetID());
if (HaveWatchOnly(script))
RemoveWatchOnly(script);
+ script = GetScriptForRawPubKey(pubkey);
+ if (HaveWatchOnly(script))
+ RemoveWatchOnly(script);
if (!fFileBacked)
return true;