Merge pull request #649 from jl777/jl777

Detect new block during wait
This commit is contained in:
jl777
2018-05-03 11:00:12 +03:00
committed by GitHub

View File

@@ -959,7 +959,14 @@ void static BitcoinMiner()
{
fprintf(stderr,"need to wait %d seconds to submit block\n",(int32_t)(B.nTime - GetAdjustedTime()));
while ( GetAdjustedTime() < B.nTime )
{
sleep(1);
if ( chainActive.Tip()->nHeight >= Mining_height )
{
fprintf(stderr,"new block arrived\n");
return(false);
}
}
}
if ( ASSETCHAINS_STAKED == 0 )
{