Delay PoW check until connect block

This commit is contained in:
jl777
2018-04-16 02:48:12 +03:00
parent 9c0f7e8947
commit b012e5ed5d

View File

@@ -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