18
src/main.cpp
18
src/main.cpp
@@ -3021,12 +3021,8 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
|
||||
// Check for duplicate
|
||||
uint256 hash = block.GetHash();
|
||||
BlockMap::iterator it = mapBlockIndex.find(hash);
|
||||
if (it != mapBlockIndex.end() )
|
||||
{
|
||||
if ( it->second != 0 )
|
||||
return it->second;
|
||||
else fprintf(stderr,"AddToBlockIndex unexpected null it->second\n");
|
||||
}
|
||||
if (it != mapBlockIndex.end())
|
||||
return it->second;
|
||||
|
||||
// Construct new block index object
|
||||
CBlockIndex* pindexNew = new CBlockIndex(block);
|
||||
@@ -3331,7 +3327,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
|
||||
CBlockIndex *heightblock = chainActive[nHeight];
|
||||
if ( heightblock != 0 && heightblock->GetBlockHash() == hash )
|
||||
{
|
||||
//fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight);
|
||||
fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight);
|
||||
return true;
|
||||
} return state.DoS(100, error("%s: rejected by checkpoint lock-in at %d", __func__, nHeight),REJECT_CHECKPOINT, "checkpoint mismatch");
|
||||
}
|
||||
@@ -3439,8 +3435,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
|
||||
return false;
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"return true pindex.%p %ppindex.%p\n",pindex,*ppindex);
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!CheckBlockHeader(*ppindex!=0?(*ppindex)->nHeight:0,*ppindex, block, state))
|
||||
@@ -3465,10 +3460,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
|
||||
return false;
|
||||
}
|
||||
if (pindex == NULL)
|
||||
{
|
||||
if ( (pindex= AddToBlockIndex(block)) == 0 )
|
||||
fprintf(stderr,"AcceptBlockHeader couldnt create pindex\n");
|
||||
}
|
||||
pindex = AddToBlockIndex(block);
|
||||
if (ppindex)
|
||||
*ppindex = pindex;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user