Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.cpp
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | |||||
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 m_block_index | ||||
while (pcursor->Valid()) { | while (pcursor->Valid()) { | ||||
boost::this_thread::interruption_point(); | boost::this_thread::interruption_point(); | ||||
if (ShutdownRequested()) { | if (ShutdownRequested()) { | ||||
return false; | return false; | ||||
} | } | ||||
std::pair<char, uint256> key; | std::pair<char, uint256> key; | ||||
if (!pcursor->GetKey(key) || key.first != DB_BLOCK_INDEX) { | if (!pcursor->GetKey(key) || key.first != DB_BLOCK_INDEX) { | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |