aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2015-06-10 00:03:08 -0700
committerMatt Corallo <git@bluematt.me>2015-07-20 16:01:37 -0700
commitcfc3dd34284357262bcc7eef2714a210891276c0 (patch)
tree5f1ccca3a6dc5a01e1a25d161903586d8b5112ea /src/wallet
parent6d6b11e793a2d1a106238a2838f5df1d3124217b (diff)
downloadbitcoin-cfc3dd34284357262bcc7eef2714a210891276c0.tar.xz
Also remove pay-2-pubkey from watch when adding a priv key
Diffstat (limited to 'src/wallet')
-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 7b3cd9803b..c118008633 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;