@@ -588,6 +588,13 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
588588 return true ;
589589}
590590
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+
591598bool WalletBatch::IsKeyType (const std::string& strType)
592599{
593600 return (strType == DBKeys::KEY ||
@@ -896,14 +903,12 @@ bool WalletBatch::Recover(const fs::path& wallet_path, std::string& out_backup_f
896903bool WalletBatch::RecoverKeysOnlyFilter (void *callbackData, CDataStream ssKey, CDataStream ssValue)
897904{
898905 CWallet *dummyWallet = reinterpret_cast <CWallet*>(callbackData);
899- CWalletScanState dummyWss;
900906 std::string strType, strErr;
901907 bool fReadOK ;
902908 {
903909 // Required in LoadKeyMetadata():
904910 LOCK (dummyWallet->cs_wallet );
905- fReadOK = ReadKeyValue (dummyWallet, ssKey, ssValue,
906- dummyWss, strType, strErr);
911+ fReadOK = ReadKeyValue (dummyWallet, ssKey, ssValue, strType, strErr);
907912 }
908913 if (!IsKeyType (strType) && strType != DBKeys::HDCHAIN) {
909914 return false ;
0 commit comments