Miner fixes

This commit is contained in:
jl777
2018-04-16 08:59:42 +03:00
parent 7413e8565f
commit cfefc9211b
2 changed files with 8 additions and 6 deletions

View File

@@ -861,6 +861,12 @@ void static BitcoinMiner()
// fprintf(stderr," missed target\n");
return false;
}
CValidationState tmpstate;
if ( !TestBlockValidity(tmpstate, *pblock, pindexPrev, true, false))
{
fprintf(stderr,"formerly valid mining block became invalid\n");
break;
}
if ( /*ASSETCHAINS_SYMBOL[0] == 0 &&*/ Mining_start != 0 && time(NULL) < Mining_start+roundrobin_delay )
{
//printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+roundrobin_delay-time(NULL)));
@@ -1002,12 +1008,6 @@ void static BitcoinMiner()
// Changing pblock->nTime can change work required on testnet:
hashTarget.SetCompact(pblock->nBits);
}
CValidationState tmpstate;
if ( !TestBlockValidity(tmpstate, *pblock, pindexPrev, true, false))
{
fprintf(stderr,"formerly valid mining block became invalid, likely due to tx expiration\n");
break;
}
}
}
}