diff options
author | Thomas Winget <tewinget@gmail.com> | 2015-03-25 11:41:30 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-03-25 12:09:44 -0400 |
commit | 7b14d4a17f739c383322312f1a597f264c074c6e (patch) | |
tree | 3934f69a876d5f10637c93fc868d5a8f139aa164 /src/blockchain_db/blockchain_db.h | |
parent | update berkeleydb branch to blockchain branch (diff) | |
download | monero-7b14d4a17f739c383322312f1a597f264c074c6e.tar.xz |
Steps toward multiple dbs available -- working
There will need to be some more refactoring for these changes to be
considered complete/correct, but for now it's working.
new daemon cli argument "--db-type", works for LMDB and BerkeleyDB.
A good deal of refactoring is also present in this commit, namely
Blockchain no longer instantiates BlockchainDB, but rather is passed a
pointer to an already-instantiated BlockchainDB on init().
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 7b6b55a40..04d9c5384 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -62,6 +62,7 @@ * * General: * open() + * is_open() * close() * sync() * reset() @@ -328,8 +329,8 @@ public: // open the db at location <filename>, or create it if there isn't one. virtual void open(const std::string& filename, const int db_flags = 0) = 0; - // make sure implementation has a create function as well - virtual void create(const std::string& filename) = 0; + // returns true of the db is open/ready, else false + bool is_open(); // close and sync the db virtual void close() = 0; @@ -482,6 +483,7 @@ public: // returns true if key image <img> is present in spent key images storage virtual bool has_key_image(const crypto::key_image& img) const = 0; + bool m_open; }; // class BlockchainDB |