| 276 | } |
| 277 | |
| 278 | bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const |
| 279 | { |
| 280 | LOCK(cs_KeyStore); |
| 281 | if (!IsCrypted()) |
| 282 | return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); |
| 283 | |
| 284 | CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); |
| 285 | if (mi != mapCryptedKeys.end()) |
| 286 | { |
| 287 | vchPubKeyOut = (*mi).second.first; |
| 288 | return true; |
| 289 | } |
| 290 | // Check for watch-only pubkeys |
| 291 | return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); |
| 292 | } |
| 293 | |
| 294 | std::set<CKeyID> CCryptoKeyStore::GetKeys() const |
| 295 | { |