Use singleton block tree database instance
This commit is contained in:
12
src/db.h
12
src/db.h
@@ -348,14 +348,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/** Access to the block database (chain.dat) */
|
||||
class CChainDB : public CDB
|
||||
/** Access to the block database (blktree.dat) */
|
||||
class CBlockTreeDB : public CDB
|
||||
{
|
||||
public:
|
||||
CChainDB(const char* pszMode="r+") : CDB("chain.dat", pszMode) { }
|
||||
CBlockTreeDB(const char* pszMode="r+") : CDB("blktree.dat", pszMode) { }
|
||||
private:
|
||||
CChainDB(const CChainDB&);
|
||||
void operator=(const CChainDB&);
|
||||
CBlockTreeDB(const CBlockTreeDB&);
|
||||
void operator=(const CBlockTreeDB&);
|
||||
public:
|
||||
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
|
||||
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
bool LoadBlockIndex(CChainDB &chaindb);
|
||||
bool LoadBlockIndexDB();
|
||||
|
||||
|
||||
/** Access to the (IP) address database (peers.dat) */
|
||||
|
||||
Reference in New Issue
Block a user