| 1038 | } |
| 1039 | |
| 1040 | bool LegacyScriptPubKeyMan::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const |
| 1041 | { |
| 1042 | LOCK(cs_KeyStore); |
| 1043 | if (!m_storage.HasEncryptionKeys()) { |
| 1044 | if (!FillableSigningProvider::GetPubKey(address, vchPubKeyOut)) { |
| 1045 | return GetWatchPubKey(address, vchPubKeyOut); |
| 1046 | } |
| 1047 | return true; |
| 1048 | } |
| 1049 | |
| 1050 | CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); |
| 1051 | if (mi != mapCryptedKeys.end()) |
| 1052 | { |
| 1053 | vchPubKeyOut = (*mi).second.first; |
| 1054 | return true; |
| 1055 | } |
| 1056 | // Check for watch-only pubkeys |
| 1057 | return GetWatchPubKey(address, vchPubKeyOut); |
| 1058 | } |
| 1059 | |
| 1060 | CPubKey LegacyScriptPubKeyMan::GenerateNewKey(WalletBatch &batch, CHDChain& hd_chain, bool internal) |
| 1061 | { |