| 527 | } |
| 528 | |
| 529 | bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const std::vector<uint8_t> &vchCryptedSecret) { |
| 530 | if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret)) |
| 531 | return false; |
| 532 | |
| 533 | if (!fFileBacked) |
| 534 | return true; |
| 535 | |
| 536 | { |
| 537 | LOCK(cs_wallet); |
| 538 | if (pWalletDbEncryption) |
| 539 | return pWalletDbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret); |
| 540 | else |
| 541 | return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret); |
| 542 | } |
| 543 | return false; |
| 544 | } |
| 545 | |
| 546 | bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<uint8_t> &vchCryptedSecret) { |
| 547 | return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); |
nothing calls this directly
no test coverage detected