mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 11:12:50 +01:00
Move RecoverDatabaseFile and RecoverKeysOnlyFilter into salvage.{cpp/h}
This commit is contained in:
@@ -885,28 +885,6 @@ void MaybeCompactWalletDB()
|
||||
fOneThread = false;
|
||||
}
|
||||
|
||||
bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDataStream ssValue)
|
||||
{
|
||||
CWallet *dummyWallet = reinterpret_cast<CWallet*>(callbackData);
|
||||
std::string strType, strErr;
|
||||
bool fReadOK;
|
||||
{
|
||||
// Required in LoadKeyMetadata():
|
||||
LOCK(dummyWallet->cs_wallet);
|
||||
fReadOK = ReadKeyValue(dummyWallet, ssKey, ssValue, strType, strErr);
|
||||
}
|
||||
if (!WalletBatch::IsKeyType(strType) && strType != DBKeys::HDCHAIN) {
|
||||
return false;
|
||||
}
|
||||
if (!fReadOK)
|
||||
{
|
||||
LogPrintf("WARNING: WalletBatch::Recover skipping %s: %s\n", strType, strErr);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WalletBatch::VerifyEnvironment(const fs::path& wallet_path, bilingual_str& errorStr)
|
||||
{
|
||||
return BerkeleyBatch::VerifyEnvironment(wallet_path, errorStr);
|
||||
|
||||
Reference in New Issue
Block a user