Fix remaining walletdb and keystore C++20 issues
This commit is contained in:
+5
-5
@@ -93,7 +93,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
|
||||
if (!SetCrypted())
|
||||
return false;
|
||||
|
||||
for (const auto& [key, val] : mapCryptedKeys)
|
||||
for (const auto& [pubKeyHash, val] : mapCryptedKeys)
|
||||
{
|
||||
const CPubKey &vchPubKey = val.first;
|
||||
const std::vector<unsigned char> &vchCryptedSecret = val.second;
|
||||
@@ -102,10 +102,10 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
|
||||
return false;
|
||||
if (vchSecret.size() != 32)
|
||||
return false;
|
||||
CKey key;
|
||||
key.SetPubKey(vchPubKey);
|
||||
key.SetSecret(vchSecret);
|
||||
if (key.GetPubKey() == vchPubKey)
|
||||
CKey decryptedKey;
|
||||
decryptedKey.SetPubKey(vchPubKey);
|
||||
decryptedKey.SetSecret(vchSecret);
|
||||
if (decryptedKey.GetPubKey() == vchPubKey)
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -98,13 +98,13 @@ public:
|
||||
bool WriteTx(uint256 hash, const CWalletTx& wtx)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write({std::string("tx"), hash}, wtx);
|
||||
return Write(std::make_pair(std::string("tx"), hash), wtx);
|
||||
}
|
||||
|
||||
bool EraseTx(uint256 hash)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase({std::string("tx"), hash});
|
||||
return Erase(std::make_pair(std::string("tx"), hash));
|
||||
}
|
||||
bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey, const CKeyMetadata &keyMeta)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user