diff --git a/src/main.cpp b/src/main.cpp index 19ce3cac9..072675fdf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2238,11 +2238,11 @@ bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos // Construct new block index object CBlockIndex* pindexNew = new CBlockIndex(block); + assert(pindexNew); { LOCK(cs_nBlockSequenceId); pindexNew->nSequenceId = nBlockSequenceId++; } - assert(pindexNew); map::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; pindexNew->phashBlock = &((*mi).first); map::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);