aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-03-14 08:50:56 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-05-11 20:42:55 +0300
commitde5e91c3034f320f84ee0308a3c31659635d136a (patch)
tree151f41771c6e49d8a1dfc6803f27e6c36e0ae2ce /src/wallet
parenteb2ffbb7c1347115e6a3d6fa30f909959b6170a5 (diff)
refactor: Add BerkeleyDatabaseVersion() function
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/db.cpp7
-rw-r--r--src/wallet/db.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 3f7c2d09cc..1b2bd83a4c 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -399,7 +399,7 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, bilingual_str&
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, walletFile);
fs::path walletDir = env->Directory();
- LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
+ LogPrintf("Using BerkeleyDB version %s\n", BerkeleyDatabaseVersion());
LogPrintf("Using wallet %s\n", file_path.string());
if (!env->Open(true /* retry */)) {
@@ -916,3 +916,8 @@ void BerkeleyDatabase::ReloadDbEnv()
env->ReloadDbEnv();
}
}
+
+std::string BerkeleyDatabaseVersion()
+{
+ return DbEnv::version(nullptr, nullptr, nullptr);
+}
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 1bf3375475..d75aeff1b8 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -402,4 +402,6 @@ public:
bool static Rewrite(BerkeleyDatabase& database, const char* pszSkip = nullptr);
};
+std::string BerkeleyDatabaseVersion();
+
#endif // BITCOIN_WALLET_DB_H