This commit is contained in:
jl777
2018-04-11 18:37:04 +03:00
parent 713c2a947a
commit 2fb22ef82d

View File

@@ -401,16 +401,16 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked)); pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked));
nFees += txfees; nFees += txfees;
pblock->nTime = blocktime; pblock->nTime = blocktime;
if ( GetAdjustedTime()+30 < pblock->nTime ) if ( GetAdjustedTime() < pblock->nTime )
{ {
//printf("need to wait %d seconds to submit: ",(int32_t)(pblock->nTime - GetAdjustedTime())); printf("need to wait %d seconds to submit: ",(int32_t)(pblock->nTime - GetAdjustedTime()));
/*while ( GetAdjustedTime()+30 < pblock->nTime ) while ( GetAdjustedTime() < pblock->nTime )
{ {
sleep(30); sleep(30);
fprintf(stderr,"%d ",(int32_t)(pblock->nTime - GetAdjustedTime())); fprintf(stderr,"%d ",(int32_t)(pblock->nTime - GetAdjustedTime()));
}*/ }
//fprintf(stderr,"finished waiting\n"); fprintf(stderr,"finished waiting\n");
sleep(30); //sleep(pblock->nTime - GetAdjustedTime());
} }
} else fprintf(stderr,"no utxos eligible for staking\n"); } else fprintf(stderr,"no utxos eligible for staking\n");