File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ class WalletDatabase
155
155
/* * Return path to main database file for logs and error messages. */
156
156
virtual std::string Filename () = 0;
157
157
158
+ /* * Return paths to all database created files */
159
+ virtual std::vector<fs::path> Files () = 0;
160
+
158
161
virtual std::string Format () = 0;
159
162
160
163
/* * Make a DatabaseBatch connected to this database */
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class BerkeleyRODatabase : public WalletDatabase
50
50
51
51
/* * Return path to main database file for logs and error messages. */
52
52
std::string Filename () override { return fs::PathToString (m_filepath); }
53
+ std::vector<fs::path> Files () override { return {m_filepath}; }
53
54
54
55
std::string Format () override { return " bdb_ro" ; }
55
56
Original file line number Diff line number Diff line change @@ -147,6 +147,14 @@ class SQLiteDatabase : public WalletDatabase
147
147
bool Backup (const std::string& dest) const override ;
148
148
149
149
std::string Filename () override { return m_file_path; }
150
+ /* * Return paths to all database created files */
151
+ std::vector<fs::path> Files () override
152
+ {
153
+ std::vector<fs::path> files;
154
+ files.emplace_back (m_dir_path / fs::PathFromString (m_file_path));
155
+ files.emplace_back (m_dir_path / fs::PathFromString (m_file_path + " -journal" ));
156
+ return files;
157
+ }
150
158
std::string Format () override { return " sqlite" ; }
151
159
152
160
/* * Make a SQLiteBatch connected to this database */
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ class MockableDatabase : public WalletDatabase
109
109
void Close () override {}
110
110
111
111
std::string Filename () override { return " mockable" ; }
112
+ std::vector<fs::path> Files () override { return {}; }
112
113
std::string Format () override { return " mock" ; }
113
114
std::unique_ptr<DatabaseBatch> MakeBatch () override { return std::make_unique<MockableBatch>(m_records, m_pass); }
114
115
};
You can’t perform that action at this time.
0 commit comments