Skip to content

Commit

Permalink
init: Move berkeleydb version reporting to wallet
Browse files Browse the repository at this point in the history
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 bitcoin#7965.
  • Loading branch information
laanwj committed May 10, 2016
1 parent f7a21da commit 3e2c946
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
#include "utilmoneystr.h"
#include "validationinterface.h"
#ifdef ENABLE_WALLET
#include "wallet/db.h"
#include "wallet/wallet.h"
#include "wallet/walletdb.h"
#endif
#include <stdint.h>
#include <stdio.h>
Expand Down Expand Up @@ -986,9 +984,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (fPrintToDebugLog)
OpenDebugLog();

#ifdef ENABLE_WALLET
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
#endif
if (!fLogTimestamps)
LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
Expand Down
1 change: 1 addition & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ void CWallet::Flush(bool shutdown)

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

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

0 comments on commit 3e2c946

Please sign in to comment.