Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { | ||||
LogPrint( | LogPrint( | ||||
"coindb", | "coindb", | ||||
"Committing %u changed transactions (out of %u) to coin database...\n", | "Committing %u changed transactions (out of %u) to coin database...\n", | ||||
(unsigned int)changed, (unsigned int)count); | (unsigned int)changed, (unsigned int)count); | ||||
return db.WriteBatch(batch); | return db.WriteBatch(batch); | ||||
} | } | ||||
size_t CCoinsViewDB::EstimateSize() const { | |||||
return db.EstimateSize(DB_COINS, char(DB_COINS + 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(GetDataDir() / "blocks" / "index", nCacheSize, fMemory, | ||||
fWipe) {} | 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); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |