diff --git a/src/wallet/load.cpp b/src/wallet/load.cpp index 60561b15725..f3620644730 100644 --- a/src/wallet/load.cpp +++ b/src/wallet/load.cpp @@ -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)…")); diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp index 0940cbac3b1..61401405b75 100644 --- a/src/wallet/sqlite.cpp +++ b/src/wallet/sqlite.cpp @@ -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); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 27a48ff9c67..9ca4d2da8bb 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -63,6 +63,12 @@ const std::string WATCHS{"watchs"}; const std::unordered_set 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 // diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 623d9e8d6ed..a867a28b970 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -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: *