Merge #15334: wallet: Log absolute paths for the wallets

a4b92e467d Log full paths for wallets (Hennadii Stepanov)

Pull request description:

  Fix #15333

  `debug.log` with this PR:
  ```
  ...
  2019-02-03T19:02:35Z Using wallet directory /home/hebasto/.bitcoin/testnet3/wallets
  2019-02-03T19:02:35Z init message: Verifying wallet(s)...
  2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2019-02-03T19:02:35Z Using wallet test_alpha/wallet.dat
  2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/db.log
  2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2019-02-03T19:02:35Z Using wallet alpha_wallet/wallet.dat
  2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/db.log
  2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2019-02-03T19:02:35Z Using wallet wallet.dat
  2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/db.log
  2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
  2019-02-03T19:02:35Z Using wallet none/wallet.dat
  2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/none/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/none/db.log
  2019-02-03T19:02:35Z init message: Loading banlist...
  ...
  ```

Tree-SHA512: 8dd4408d3f6b04f396dd0ae0d248fedc3a0f6d36788556ae1662443f06f2ecce1c2be9456bf8d1b3d25b29c2a0cfb03cb805bde0a40387e68988ab932e17e118
This commit is contained in:
Wladimir J. van der Laan 2019-02-13 22:51:14 +01:00
commit 9c93f5d9fc
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -397,7 +397,7 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er
fs::path walletDir = env->Directory(); fs::path walletDir = env->Directory();
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr)); LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
LogPrintf("Using wallet %s\n", walletFile); LogPrintf("Using wallet %s\n", file_path.string());
// Wallet file must be a plain filename without a directory // Wallet file must be a plain filename without a directory
if (walletFile != fs::basename(walletFile) + fs::extension(walletFile)) if (walletFile != fs::basename(walletFile) + fs::extension(walletFile))