Skip to content

Commit 3e2c946

Browse files
committed
init: Move berkeleydb version reporting to wallet
Move the version reporting to Wallet::Verify, before starting verification of the wallet. This removes the dependency of init on a specific wallet database library. A further, trivial step towards resolving #7965.
1 parent f7a21da commit 3e2c946

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/init.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
#include "utilmoneystr.h"
3838
#include "validationinterface.h"
3939
#ifdef ENABLE_WALLET
40-
#include "wallet/db.h"
4140
#include "wallet/wallet.h"
42-
#include "wallet/walletdb.h"
4341
#endif
4442
#include <stdint.h>
4543
#include <stdio.h>
@@ -986,9 +984,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
986984
if (fPrintToDebugLog)
987985
OpenDebugLog();
988986

989-
#ifdef ENABLE_WALLET
990-
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
991-
#endif
992987
if (!fLogTimestamps)
993988
LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
994989
LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());

src/wallet/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ void CWallet::Flush(bool shutdown)
368368

369369
bool CWallet::Verify()
370370
{
371+
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
371372
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
372373

373374
LogPrintf("Using wallet %s\n", walletFile);

0 commit comments

Comments
 (0)