diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-05-26 20:53:06 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-10-14 11:28:17 -0400 |
commit | 5a488b3d77326a0d957c1233493061da1b6ec207 (patch) | |
tree | 2ffa8972c26d53e007a2b60686602a36cb01aa41 /src/wallet/sqlite.cpp | |
parent | ca8b7e04ab89f99075b093fa248919fd10acbdf7 (diff) |
Constructors, destructors, and relevant private fields for SQLiteDatabase/Batch
Diffstat (limited to 'src/wallet/sqlite.cpp')
-rw-r--r-- | src/wallet/sqlite.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp index c406269cab..9a9904e17d 100644 --- a/src/wallet/sqlite.cpp +++ b/src/wallet/sqlite.cpp @@ -4,6 +4,7 @@ #include <wallet/sqlite.h> +#include <logging.h> #include <util/memory.h> #include <util/strencodings.h> #include <util/translation.h> @@ -17,10 +18,15 @@ static const char* const DATABASE_FILENAME = "wallet.dat"; SQLiteDatabase::SQLiteDatabase(const fs::path& dir_path, const fs::path& file_path, bool mock) : WalletDatabase(), m_mock(mock), m_dir_path(dir_path.string()), m_file_path(file_path.string()) { + LogPrintf("Using SQLite Version %s\n", SQLiteDatabaseVersion()); + LogPrintf("Using wallet %s\n", m_dir_path); + + Open(); } SQLiteDatabase::~SQLiteDatabase() { + Close(); } void SQLiteDatabase::Open() @@ -46,6 +52,11 @@ std::unique_ptr<DatabaseBatch> SQLiteDatabase::MakeBatch(bool flush_on_close) return nullptr; } +SQLiteBatch::SQLiteBatch(SQLiteDatabase& database) + : m_database(database) +{ +} + void SQLiteBatch::Close() { } |