aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-08-04 20:45:28 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-09-03 12:24:32 -0400
commit8b5e7297c02f3100a9cb27bfe206e3fc617ec173 (patch)
treed77b54fad59498c100511fe1565d9b06c55fe444 /src/wallet/db.h
parent3c815cfe54087fd139169161d2fd175e99840e6a (diff)
downloadbitcoin-8b5e7297c02f3100a9cb27bfe206e3fc617ec173.tar.xz
refactor: Pass wallet database into CWallet::Create
No changes in behavior
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 6e11d7de88..96d1f44d91 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -18,8 +18,6 @@
struct bilingual_str;
-/** Given a wallet directory path or legacy file path, return path to main data file in the wallet database. */
-fs::path WalletDataFilePath(const fs::path& wallet_path);
void SplitWalletPath(const fs::path& wallet_path, fs::path& env_directory, std::string& database_filename);
/** RAII class that provides access to a WalletDatabase */
@@ -142,13 +140,14 @@ public:
virtual void ReloadDbEnv() = 0;
+ /** Return path to main database file for logs and error messages. */
+ virtual std::string Filename() = 0;
+
std::atomic<unsigned int> nUpdateCounter;
unsigned int nLastSeen;
unsigned int nLastFlushed;
int64_t nLastWalletUpdate;
- std::string m_file_path;
-
/** Make a DatabaseBatch connected to this database */
virtual std::unique_ptr<DatabaseBatch> MakeBatch(const char* mode = "r+", bool flush_on_close = true) = 0;
};
@@ -189,6 +188,7 @@ public:
bool PeriodicFlush() override { return true; }
void IncrementUpdateCounter() override { ++nUpdateCounter; }
void ReloadDbEnv() override {}
+ std::string Filename() override { return "dummy"; }
std::unique_ptr<DatabaseBatch> MakeBatch(const char* mode = "r+", bool flush_on_close = true) override { return MakeUnique<DummyBatch>(); }
};