Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) { | ||||
} | } | ||||
fValue = ch == '1'; | fValue = ch == '1'; | ||||
return true; | return true; | ||||
} | } | ||||
bool CBlockTreeDB::LoadBlockIndexGuts( | bool CBlockTreeDB::LoadBlockIndexGuts( | ||||
const Consensus::Params ¶ms, | const Consensus::Params ¶ms, | ||||
std::function<CBlockIndex *(const BlockHash &)> insertBlockIndex) { | std::function<CBlockIndex *(const BlockHash &)> insertBlockIndex) { | ||||
std::unique_ptr<CDBIterator> pcursor(NewIterator()); | std::unique_ptr<CDBIterator> pcursor(NewIterator()); | ||||
pcursor->Seek(std::make_pair(DB_BLOCK_INDEX, uint256())); | pcursor->Seek(std::make_pair(DB_BLOCK_INDEX, uint256())); | ||||
// Load mapBlockIndex | // Load mapBlockIndex | ||||
while (pcursor->Valid()) { | while (pcursor->Valid()) { | ||||
boost::this_thread::interruption_point(); | boost::this_thread::interruption_point(); | ||||
std::pair<char, uint256> key; | std::pair<char, uint256> key; | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |