mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #11272: CKeystore/CCrypter: move relevant implementation out of the header
dd9bb25Fix code style in keystore.cpp/crypter.cpp (Jonas Schnelli)208fda6CCrypter: move relevant implementation out of the header (Jonas Schnelli)3155fd2CKeystore: move relevant implementation out of the header (Jonas Schnelli) Pull request description: Tree-SHA512: 4ce73cca5609199b74b8ff2614ee2b6af949545a1332a3a0135c6453c98665d2b0da171c1e390c9a2aec6b12b7fad931ec90084bb7c2defe243786bfc70daf60
This commit is contained in:
@@ -139,52 +139,16 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool IsCrypted() const
|
||||
{
|
||||
return fUseCrypto;
|
||||
}
|
||||
|
||||
bool IsLocked() const
|
||||
{
|
||||
if (!IsCrypted())
|
||||
return false;
|
||||
bool result;
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
result = vMasterKey.empty();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IsCrypted() const { return fUseCrypto; }
|
||||
bool IsLocked() const;
|
||||
bool Lock();
|
||||
|
||||
virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
|
||||
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;
|
||||
bool HaveKey(const CKeyID &address) const override
|
||||
{
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
if (!IsCrypted()) {
|
||||
return CBasicKeyStore::HaveKey(address);
|
||||
}
|
||||
return mapCryptedKeys.count(address) > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool HaveKey(const CKeyID &address) const override;
|
||||
bool GetKey(const CKeyID &address, CKey& keyOut) const override;
|
||||
bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override;
|
||||
std::set<CKeyID> GetKeys() const override
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
if (!IsCrypted()) {
|
||||
return CBasicKeyStore::GetKeys();
|
||||
}
|
||||
std::set<CKeyID> set_address;
|
||||
for (const auto& mi : mapCryptedKeys) {
|
||||
set_address.insert(mi.first);
|
||||
}
|
||||
return set_address;
|
||||
}
|
||||
std::set<CKeyID> GetKeys() const override;
|
||||
|
||||
/**
|
||||
* Wallet status (encrypted, locked) changed.
|
||||
|
||||
Reference in New Issue
Block a user