Browse Source

proper deleting leveldb iterator fixes assertion failure

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
2499954dbd
  1. 5
      src/txdb.cpp

5
src/txdb.cpp

@ -230,14 +230,17 @@ bool CBlockTreeDB::LoadBlockIndexGuts() @@ -230,14 +230,17 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
if (pindexGenesisBlock == NULL && diskindex.GetBlockHash() == Params().HashGenesisBlock())
pindexGenesisBlock = pindexNew;
if (!pindexNew->CheckIndex())
if (!pindexNew->CheckIndex()) {
delete pcursor;
return error("LoadBlockIndex() : CheckIndex failed: %s", pindexNew->ToString().c_str());
}
pcursor->Next();
} else {
break; // if shutdown requested or finished loading block index
}
} catch (std::exception &e) {
delete pcursor;
return error("%s() : deserialize error", __PRETTY_FUNCTION__);
}
}

Loading…
Cancel
Save