aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2015-06-10 01:04:08 -0700
committerMatt Corallo <[email protected]>2015-07-20 16:01:37 -0700
commitf5813bdd3eb93a2a8d7ba01989eef5b299fcbca4 (patch)
tree7830024c8e7ab4a638ee534b5bab1b190010c2ee /src/wallet/crypter.cpp
parentAdd have-pubkey distinction to ISMINE flags (diff)
downloaddiscoin-f5813bdd3eb93a2a8d7ba01989eef5b299fcbca4.tar.xz
discoin-f5813bdd3eb93a2a8d7ba01989eef5b299fcbca4.zip
Add logic to track pubkeys as watch-only, not just scripts
Diffstat (limited to 'src/wallet/crypter.cpp')
-rw-r--r--src/wallet/crypter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp
index c7f7e2167..a3e28f6ac 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -255,7 +255,7 @@ bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) co
{
LOCK(cs_KeyStore);
if (!IsCrypted())
- return CKeyStore::GetPubKey(address, vchPubKeyOut);
+ return CBasicKeyStore::GetPubKey(address, vchPubKeyOut);
CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
if (mi != mapCryptedKeys.end())
@@ -263,6 +263,8 @@ bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) co
vchPubKeyOut = (*mi).second.first;
return true;
}
+ // Check for watch-only pubkeys
+ return CBasicKeyStore::GetPubKey(address, vchPubKeyOut);
}
return false;
}