10 second window for notary mining

This commit is contained in:
jl777
2018-04-23 23:47:48 +03:00
parent 8d725ab46f
commit 43ef3068d1
2 changed files with 3 additions and 3 deletions

View File

@@ -3761,10 +3761,10 @@ bool CheckBlockHeader(int32_t height,CBlockIndex *pindex, const CBlockHeader& bl
if (blockhdr.GetBlockTime() > GetAdjustedTime() + 60)
{
CBlockIndex *tipindex;
fprintf(stderr,"future block %u vs time.%u + 60\n",(uint32_t)blockhdr.GetBlockTime(),(uint32_t)GetAdjustedTime());
fprintf(stderr,"ht.%d future block %u vs time.%u + 60\n",height,(uint32_t)blockhdr.GetBlockTime(),(uint32_t)GetAdjustedTime());
if ( (tipindex= chainActive.Tip()) != 0 && tipindex->GetBlockHash() == blockhdr.hashPrevBlock && blockhdr.GetBlockTime() < GetAdjustedTime() + 60*2 )
{
fprintf(stderr,"it is the next block, let's wait a bit\n");
fprintf(stderr,"it is the next block, let's wait for %d seconds\n",GetAdjustedTime() + 60 - blockhdr.GetBlockTime());
while ( blockhdr.GetBlockTime() > GetAdjustedTime() + 60 )
sleep(1);
fprintf(stderr,"now its valid\n");