aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-05-26 20:53:05 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-10-14 11:27:40 -0400
commitca8b7e04ab89f99075b093fa248919fd10acbdf7 (patch)
tree26a0d07f1b1d139ba8f0dd119cd33d5637ba844f /src
parent7577b6e1c88a1a7b45ecf5c7f1735bae6f5a82bf (diff)
Implement SQLiteDatabaseVersion
Diffstat (limited to 'src')
-rw-r--r--src/wallet/sqlite.cpp6
-rw-r--r--src/wallet/sqlite.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp
index 0ea1317795..c406269cab 100644
--- a/src/wallet/sqlite.cpp
+++ b/src/wallet/sqlite.cpp
@@ -9,6 +9,7 @@
#include <util/translation.h>
#include <wallet/db.h>
+#include <sqlite3.h>
#include <stdint.h>
static const char* const DATABASE_FILENAME = "wallet.dat";
@@ -107,3 +108,8 @@ std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const D
{
return MakeUnique<SQLiteDatabase>(path, path / DATABASE_FILENAME);
}
+
+std::string SQLiteDatabaseVersion()
+{
+ return std::string(sqlite3_libversion());
+}
diff --git a/src/wallet/sqlite.h b/src/wallet/sqlite.h
index 0c9ab32fc8..b529301771 100644
--- a/src/wallet/sqlite.h
+++ b/src/wallet/sqlite.h
@@ -96,4 +96,6 @@ public:
bool ExistsSQLiteDatabase(const fs::path& path);
std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
+std::string SQLiteDatabaseVersion();
+
#endif // BITCOIN_WALLET_SQLITE_H