aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-05-13 14:58:02 +0800
committerfanquake <fanquake@gmail.com>2020-05-13 15:19:05 +0800
commit219c55da752dc48dd885c895f3998f3bc263fd93 (patch)
tree08b1e362d14c90e2c8a9aa7b5fff7c27b0dc2cb4 /src/wallet/db.cpp
parent8da1e43b63cb36759eeb1fcfd6768163265c44e2 (diff)
parent839add193b13c17a40f42ff69d973caeb800d3f2 (diff)
Merge #16710: build: Enable -Wsuggest-override if available
839add193b13c17a40f42ff69d973caeb800d3f2 build: Enable -Wsuggest-override (Hennadii Stepanov) de5e91c3034f320f84ee0308a3c31659635d136a refactor: Add BerkeleyDatabaseVersion() function (Hennadii Stepanov) Pull request description: From GCC [docs](https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html): > `-Wsuggest-override` > Warn about overriding virtual functions that are not marked with the override keyword. ~This PR is based on #16722 (the first commit).~ See: https://github.com/bitcoin/bitcoin/pull/16722#issuecomment-584111086 ACKs for top commit: fanquake: ACK 839add193b13c17a40f42ff69d973caeb800d3f2 vasild: ACK 839add193 practicalswift: ACK 839add193b13c17a40f42ff69d973caeb800d3f2 assuming Travis is happy: patch looks correct Tree-SHA512: 1e8cc085da30d41536deff9b181962c1882314ab252c2ad958294087ae1e5a0dfa4886bdbe36f21cf6ae71df776a8420f349f007d4b5b49fd79ba98ce308965a
Diffstat (limited to 'src/wallet/db.cpp')
-rw-r--r--src/wallet/db.cpp7
1 files changed, 6 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);
+}