MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddCryptedKey

Method AddCryptedKey

src/wallet/scriptpubkeyman.cpp:849–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847}
848
849bool 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
867bool LegacyScriptPubKeyMan::HaveWatchOnly(const CScript &dest) const
868{

Callers 1

LoadWalletMethod · 0.80

Calls 4

WalletBatchClass · 0.85
WriteCryptedKeyMethod · 0.80
GetIDMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected