| 33 | } |
| 34 | |
| 35 | bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const |
| 36 | { |
| 37 | CKey key; |
| 38 | if (!GetKey(address, key)) { |
| 39 | LOCK(cs_KeyStore); |
| 40 | WatchKeyMap::const_iterator it = mapWatchKeys.find(address); |
| 41 | if (it != mapWatchKeys.end()) { |
| 42 | vchPubKeyOut = it->second; |
| 43 | return true; |
| 44 | } |
| 45 | return false; |
| 46 | } |
| 47 | vchPubKeyOut = key.GetPubKey(); |
| 48 | return true; |
| 49 | } |
| 50 | |
| 51 | bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) |
| 52 | { |