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))
|
if (!ContextualCheckBlockHeader(block, state, pindexPrev))
|
||||||
return false;
|
return false;
|
||||||
if (pindex == NULL)
|
if (pindex == NULL)
|
||||||
pindex = AddToBlockIndex(block);
|
{
|
||||||
|
if ( (pindex= AddToBlockIndex(block)) == 0 )
|
||||||
|
fprintf(stderr,"couldnt add to block index\n");
|
||||||
|
}
|
||||||
if (ppindex)
|
if (ppindex)
|
||||||
*ppindex = pindex;
|
*ppindex = pindex;
|
||||||
return true;
|
return true;
|
||||||
@@ -3825,7 +3828,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
|
|||||||
return false;
|
return false;
|
||||||
if ( pindex == 0 )
|
if ( pindex == 0 )
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"AcceptBlock error null pindex\n");
|
fprintf(stderr,"AcceptBlock error null pindex\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Try to process all requested blocks that we don't have, but only
|
// Try to process all requested blocks that we don't have, but only
|
||||||
|
|||||||
Reference in New Issue
Block a user