Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { | ||||
return ret; | return ret; | ||||
} | } | ||||
size_t CCoinsViewDB::EstimateSize() const { | size_t CCoinsViewDB::EstimateSize() const { | ||||
return db.EstimateSize(DB_COIN, char(DB_COIN + 1)); | return db.EstimateSize(DB_COIN, char(DB_COIN + 1)); | ||||
} | } | ||||
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) | CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) | ||||
: CDBWrapper(GetDataDir() / "blocks" / "index", nCacheSize, fMemory, | : CDBWrapper(gArgs.IsArgSet("-blocksdir") | ||||
fWipe) {} | ? GetDataDir() / "blocks" / "index" | ||||
: GetBlocksDir() / "index", | |||||
nCacheSize, fMemory, fWipe) {} | |||||
bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) { | bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) { | ||||
return Read(std::make_pair(DB_BLOCK_FILES, nFile), info); | return Read(std::make_pair(DB_BLOCK_FILES, nFile), info); | ||||
} | } | ||||
bool CBlockTreeDB::WriteReindexing(bool fReindexing) { | bool CBlockTreeDB::WriteReindexing(bool fReindexing) { | ||||
if (fReindexing) | if (fReindexing) | ||||
return Write(DB_REINDEX_FLAG, '1'); | return Write(DB_REINDEX_FLAG, '1'); | ||||
▲ Show 20 Lines • Show All 462 Lines • Show Last 20 Lines |