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

@@ -11,7 +11,7 @@
class CCoinsDB : public CDB
{
public:
CCoinsDB(const char* pszMode="r+") : CDB("coins.dat", pszMode) { }
CCoinsDB() : CDB("coins.dat", "cr+") { }
private:
CCoinsDB(const CCoinsDB&);
void operator=(const CCoinsDB&);
@@ -43,7 +43,7 @@ public:
class CBlockTreeDB : public CDB
{
public:
CBlockTreeDB(const char* pszMode="r+") : CDB("blktree.dat", pszMode) { }
CBlockTreeDB() : CDB("blktree.dat", "cr+") { }
private:
CBlockTreeDB(const CBlockTreeDB&);
void operator=(const CBlockTreeDB&);