Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 959 Lines • ▼ Show 20 Lines | for (const std::shared_ptr<CWallet> &pwallet : GetWallets()) { | ||||
dbh.nLastFlushed = nUpdateCounter; | dbh.nLastFlushed = nUpdateCounter; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
fOneThread = false; | 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, | bool WalletBatch::VerifyEnvironment(const fs::path &wallet_path, | ||||
bilingual_str &errorStr) { | bilingual_str &errorStr) { | ||||
return BerkeleyBatch::VerifyEnvironment(wallet_path, errorStr); | return BerkeleyBatch::VerifyEnvironment(wallet_path, errorStr); | ||||
} | } | ||||
bool WalletBatch::VerifyDatabaseFile(const fs::path &wallet_path, | bool WalletBatch::VerifyDatabaseFile(const fs::path &wallet_path, | ||||
bilingual_str &errorStr) { | bilingual_str &errorStr) { | ||||
return BerkeleyBatch::VerifyDatabaseFile(wallet_path, errorStr); | return BerkeleyBatch::VerifyDatabaseFile(wallet_path, errorStr); | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |