@@ -588,6 +588,13 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
588
588
return true ;
589
589
}
590
590
591
+ bool ReadKeyValue (CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, std::string& strType, std::string& strErr)
592
+ {
593
+ CWalletScanState dummy_wss;
594
+ LOCK (pwallet->cs_wallet );
595
+ return ReadKeyValue (pwallet, ssKey, ssValue, dummy_wss, strType, strErr);
596
+ }
597
+
591
598
bool WalletBatch::IsKeyType (const std::string& strType)
592
599
{
593
600
return (strType == DBKeys::KEY ||
@@ -896,14 +903,12 @@ bool WalletBatch::Recover(const fs::path& wallet_path, std::string& out_backup_f
896
903
bool WalletBatch::RecoverKeysOnlyFilter (void *callbackData, CDataStream ssKey, CDataStream ssValue)
897
904
{
898
905
CWallet *dummyWallet = reinterpret_cast <CWallet*>(callbackData);
899
- CWalletScanState dummyWss;
900
906
std::string strType, strErr;
901
907
bool fReadOK ;
902
908
{
903
909
// Required in LoadKeyMetadata():
904
910
LOCK (dummyWallet->cs_wallet );
905
- fReadOK = ReadKeyValue (dummyWallet, ssKey, ssValue,
906
- dummyWss, strType, strErr);
911
+ fReadOK = ReadKeyValue (dummyWallet, ssKey, ssValue, strType, strErr);
907
912
}
908
913
if (!IsKeyType (strType) && strType != DBKeys::HDCHAIN) {
909
914
return false ;
0 commit comments