Delay PoW check until connect block
This commit is contained in:
@@ -3809,7 +3809,10 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
|
||||
if (!ContextualCheckBlockHeader(block, state, pindexPrev))
|
||||
return false;
|
||||
if (pindex == NULL)
|
||||
pindex = AddToBlockIndex(block);
|
||||
{
|
||||
if ( (pindex= AddToBlockIndex(block)) == 0 )
|
||||
fprintf(stderr,"couldnt add to block index\n");
|
||||
}
|
||||
if (ppindex)
|
||||
*ppindex = pindex;
|
||||
return true;
|
||||
@@ -3825,7 +3828,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
|
||||
return false;
|
||||
if ( pindex == 0 )
|
||||
{
|
||||
//fprintf(stderr,"AcceptBlock error null pindex\n");
|
||||
fprintf(stderr,"AcceptBlock error null pindex\n");
|
||||
return false;
|
||||
}
|
||||
// Try to process all requested blocks that we don't have, but only
|
||||
|
||||
Reference in New Issue
Block a user