aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2019-03-06 13:22:41 -0800
committerGlenn Willen <gwillen@nerdnet.org>2019-03-14 18:49:19 -0700
commitfaf369880822188f2738c6f046d9ef14c9585713 (patch)
treee16897d77ccb2c21bb4ba22ead17925767bcb50f /src/wallet/db.h
parent4952a953585e99477a89989b009749e40c173013 (diff)
wallet: Improve log output for errors during load
When loading the wallet, display the entire path in error messages, instead of the name (which, for the default wallet, is the empty string.) When an exception occurs during wallet loading, display e.what() if possible, instead of nothing.
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 9df965305a..762fb83a2f 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -101,6 +101,9 @@ public:
/** Return whether a wallet database is currently loaded. */
bool IsWalletLoaded(const fs::path& wallet_path);
+/** Given a wallet directory path or legacy file path, return path to main data file in the wallet database. */
+fs::path WalletDataFilePath(const fs::path& wallet_path);
+
/** Get BerkeleyEnvironment and database filename given a wallet path. */
std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& wallet_path, std::string& database_filename);