| 847 | } |
| 848 | |
| 849 | bool LegacyScriptPubKeyMan::AddCryptedKey(const CPubKey &vchPubKey, |
| 850 | const std::vector<unsigned char> &vchCryptedSecret) |
| 851 | { |
| 852 | if (!AddCryptedKeyInner(vchPubKey, vchCryptedSecret)) |
| 853 | return false; |
| 854 | { |
| 855 | LOCK(cs_KeyStore); |
| 856 | if (encrypted_batch) |
| 857 | return encrypted_batch->WriteCryptedKey(vchPubKey, |
| 858 | vchCryptedSecret, |
| 859 | mapKeyMetadata[vchPubKey.GetID()]); |
| 860 | else |
| 861 | return WalletBatch(m_storage.GetDatabase()).WriteCryptedKey(vchPubKey, |
| 862 | vchCryptedSecret, |
| 863 | mapKeyMetadata[vchPubKey.GetID()]); |
| 864 | } |
| 865 | } |
| 866 | |
| 867 | bool LegacyScriptPubKeyMan::HaveWatchOnly(const CScript &dest) const |
| 868 | { |
no test coverage detected