| 339 | } |
| 340 | |
| 341 | bool CCryptoKeyStore::GetPubKey(const CKeyID& address, CPubKey& vchPubKeyOut) const |
| 342 | { |
| 343 | LOCK(cs_KeyStore); |
| 344 | if (!IsCrypted()) |
| 345 | return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); |
| 346 | |
| 347 | CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); |
| 348 | if (mi != mapCryptedKeys.end()) { |
| 349 | vchPubKeyOut = (*mi).second.first; |
| 350 | return true; |
| 351 | } |
| 352 | // Check for watch-only pubkeys |
| 353 | return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); |
| 354 | } |
| 355 | #if 0 |
| 356 | std::set<CKeyID> CCryptoKeyStore::GetKeys() const |
| 357 | { |
no test coverage detected