Merge branch 'Asher-Dev' into dev

This commit is contained in:
Asher Dawes
2018-08-11 13:43:41 -07:00
committed by GitHub
5 changed files with 206 additions and 20 deletions

View File

@@ -628,9 +628,12 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pcursor->Seek(ssKeySet.str());
// Load mapBlockIndex
LogPrintf("Past the pcursor->Seek\n");
while (pcursor->Valid()) {
LogPrintf("Before interruption_point\n");
boost::this_thread::interruption_point();
try {
LogPrintf("Before pcursor->key\n");
leveldb::Slice slKey = pcursor->key();
CDataStream ssKey(slKey.data(), slKey.data()+slKey.size(), SER_DISK, CLIENT_VERSION);
char chType;
@@ -663,7 +666,9 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->nSproutValue = diskindex.nSproutValue;
// Consistency checks
LogPrintf("Debug Before the auto header\n");
auto header = pindexNew->GetBlockHeader();
LogPrintf("Debug Past the auto header\n");
if (header.GetHash() != pindexNew->GetBlockHash())
return error("LoadBlockIndex(): block header inconsistency detected: on-disk = %s, in-memory = %s",
diskindex.ToString(), pindexNew->ToString());