10 second window for notary mining
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -463,7 +463,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && NOTARY_PUBKEY33[0] != 0 && pblock->nTime < pindexPrev->nTime+60 )
|
||||
{
|
||||
pblock->nTime = pindexPrev->nTime + 60;
|
||||
while ( pblock->GetBlockTime() > GetAdjustedTime() + 30 )
|
||||
while ( pblock->GetBlockTime() > GetAdjustedTime() + 10 )
|
||||
sleep(1);
|
||||
//fprintf(stderr,"block.nTime %u vs prev.%u, gettime.%u vs adjusted.%u\n",(uint32_t)pblock->nTime,(uint32_t)(pindexPrev->nTime + 60),(uint32_t)pblock->GetBlockTime(),(uint32_t)(GetAdjustedTime() + 60));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user