Add LevelDB MemEnv support

Support LevelDB memory-backed environments, and use them in unit tests.
This commit is contained in:
Pieter Wuille
2012-09-04 18:12:00 +02:00
parent 2d8a48292b
commit e1bfbab802
8 changed files with 27 additions and 12 deletions

View File

@@ -69,7 +69,7 @@ private:
leveldb::DB *pdb;
public:
CLevelDB(const boost::filesystem::path &path);
CLevelDB(const boost::filesystem::path &path, bool fMemory = false);
~CLevelDB();
template<typename K, typename V> bool Read(const K& key, V& value) {