diff options
Diffstat (limited to 'src/blockchain_db')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 3 | ||||
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 7 | ||||
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 2a7fa8f82..d2b4a07a7 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -343,6 +343,9 @@ public: // get all files used by this db (if any) virtual std::vector<std::string> get_filenames() const = 0; + // return the name of the folder the db's file(s) should reside in + virtual std::string get_db_name() const = 0; + // FIXME: these are just for functionality mocking, need to implement // RAII-friendly and multi-read one-write friendly locking mechanism diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index feff4a272..ee49e1827 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -775,6 +775,13 @@ std::vector<std::string> BlockchainLMDB::get_filenames() const return filenames; } +std::string BlockchainLMDB::get_db_name() const +{ + LOG_PRINT_L3("BlockchainLMDB::" << __func__); + + return std::string("lmdb"); +} + // TODO: this? bool BlockchainLMDB::lock() { diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index f6582fce4..1a684548e 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -126,6 +126,8 @@ public: virtual std::vector<std::string> get_filenames() const; + virtual std::string get_db_name() const; + virtual bool lock(); virtual void unlock(); |