mirror of https://github.com/bitcoin/bitcoin.git
Merge bitcoin/bitcoin#33299: wallet: reduce unconditional logging during load
fc861332b3
wallet, log: reduce unconditional logging during load (furszy) Pull request description: Currently the unconditional log during init with a default wallet happens three times: ``` 2025-09-03T19:57:16Z init message: Verifying wallet(s)… 2025-09-03T19:57:16Z Using SQLite Version 3.45.1 2025-09-03T19:57:16Z Using wallet XXX/.bitcoin/regtest 2025-09-03T19:57:16Z Using SQLite Version 3.45.1 2025-09-03T19:57:16Z Using wallet XXX/.bitcoin/regtest (...) 2025-09-03T19:57:16Z Using SQLite Version 3.45.1 2025-09-03T19:57:16Z Using wallet XXX/.bitcoin/regtest 2025-09-03T19:57:16Z init message: Loading wallet… ``` For non-default wallets it's logged two times. That seems a bit too much, so just log the SQLite version just one, and remove the log for the full path of the wallet, since it's already clear from other logs which wallet is being loaded. ACKs for top commit: achow101: ACKfc861332b3
furszy: utACKfc861332b3
stickies-v: ACKfc861332b3
Tree-SHA512: ca45c8ede985e6feab0cb93d718a6d633691276ca6e5f13f6471759f11dee98b312e1c802a7fb42c7fa859b6edc44a8c54b9e2ca389655cf028aebf2dabe51f6
This commit is contained in:
commit
8f73d95221
|
@ -51,6 +51,8 @@ bool VerifyWallets(WalletContext& context)
|
||||||
}
|
}
|
||||||
|
|
||||||
LogInfo("Using wallet directory %s", fs::PathToString(GetWalletDir()));
|
LogInfo("Using wallet directory %s", fs::PathToString(GetWalletDir()));
|
||||||
|
// Print general DB information
|
||||||
|
LogDBInfo();
|
||||||
|
|
||||||
chain.initMessage(_("Verifying wallet(s)…"));
|
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);
|
LOCK(g_sqlite_mutex);
|
||||||
LogInfo("Using SQLite Version %s", SQLiteDatabaseVersion());
|
|
||||||
LogInfo("Using wallet %s", fs::PathToString(m_dir_path));
|
|
||||||
|
|
||||||
if (++g_sqlite_count == 1) {
|
if (++g_sqlite_count == 1) {
|
||||||
// Setup logging
|
// Setup logging
|
||||||
int ret = sqlite3_config(SQLITE_CONFIG_LOG, ErrorLogCallback, nullptr);
|
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};
|
const std::unordered_set<std::string> LEGACY_TYPES{CRYPTED_KEY, CSCRIPT, DEFAULTKEY, HDCHAIN, KEYMETA, KEY, OLD_KEY, POOL, WATCHMETA, WATCHS};
|
||||||
} // namespace DBKeys
|
} // namespace DBKeys
|
||||||
|
|
||||||
|
void LogDBInfo()
|
||||||
|
{
|
||||||
|
// Add useful DB information here. This will be printed during startup.
|
||||||
|
LogInfo("Using SQLite Version %s", SQLiteDatabaseVersion());
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// WalletBatch
|
// WalletBatch
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,6 +27,9 @@ class CWallet;
|
||||||
class CWalletTx;
|
class CWalletTx;
|
||||||
struct WalletContext;
|
struct WalletContext;
|
||||||
|
|
||||||
|
// Logs information about the database, including available engines, features, and other capabilities
|
||||||
|
void LogDBInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overview of wallet database classes:
|
* Overview of wallet database classes:
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue