mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 07:18:33 +02:00
wallet, log: reduce unconditional logging during load
The removed statements were logged up to two or three times for each loaded wallet. The SQLite version only needs to be logged once. The full wallet path is dropped, since the existing unconditional logging while loading wallets is sufficient (also reduces anonymization efforts in case of sharing logs). Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
This commit is contained in:
@@ -51,6 +51,8 @@ bool VerifyWallets(WalletContext& context)
|
||||
}
|
||||
|
||||
LogInfo("Using wallet directory %s", fs::PathToString(GetWalletDir()));
|
||||
// Print general DB information
|
||||
LogDBInfo();
|
||||
|
||||
chain.initMessage(_("Verifying wallet(s)…"));
|
||||
|
||||
|
||||
@@ -116,9 +116,6 @@ SQLiteDatabase::SQLiteDatabase(const fs::path& dir_path, const fs::path& file_pa
|
||||
{
|
||||
{
|
||||
LOCK(g_sqlite_mutex);
|
||||
LogInfo("Using SQLite Version %s", SQLiteDatabaseVersion());
|
||||
LogInfo("Using wallet %s", fs::PathToString(m_dir_path));
|
||||
|
||||
if (++g_sqlite_count == 1) {
|
||||
// Setup logging
|
||||
int ret = sqlite3_config(SQLITE_CONFIG_LOG, ErrorLogCallback, nullptr);
|
||||
|
||||
@@ -63,6 +63,12 @@ const std::string WATCHS{"watchs"};
|
||||
const std::unordered_set<std::string> LEGACY_TYPES{CRYPTED_KEY, CSCRIPT, DEFAULTKEY, HDCHAIN, KEYMETA, KEY, OLD_KEY, POOL, WATCHMETA, WATCHS};
|
||||
} // namespace DBKeys
|
||||
|
||||
void LogDBInfo()
|
||||
{
|
||||
// Add useful DB information here. This will be printed during startup.
|
||||
LogInfo("Using SQLite Version %s", SQLiteDatabaseVersion());
|
||||
}
|
||||
|
||||
//
|
||||
// WalletBatch
|
||||
//
|
||||
|
||||
@@ -27,6 +27,9 @@ class CWallet;
|
||||
class CWalletTx;
|
||||
struct WalletContext;
|
||||
|
||||
// Logs information about the database, including available engines, features, and other capabilities
|
||||
void LogDBInfo();
|
||||
|
||||
/**
|
||||
* Overview of wallet database classes:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user