This commit is contained in:
jl777
2018-05-08 19:05:38 +03:00
parent e37664a90f
commit de230f5e75

View File

@@ -414,25 +414,14 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
if ( (siglen= komodo_staked(txStaked,pblock->nBits,&blocktime,&txtime,&utxotxid,&utxovout,&utxovalue,utxosig)) > 0 )
{
CAmount txfees = 0;
if ( GetAdjustedTime() < blocktime-30 )
if ( GetAdjustedTime() < blocktime-13 )
return(0);
pblock->vtx.push_back(txStaked);
pblocktemplate->vTxFees.push_back(txfees);
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked));
nFees += txfees;
pblock->nTime = blocktime;
printf("PoS ht.%d t%u\n",(int32_t)chainActive.Tip()->nHeight+1,blocktime);
if ( 0 && GetAdjustedTime() < pblock->nTime )
{
fprintf(stderr,"need to wait %d seconds to mine:\n",(int32_t)(pblock->nTime - GetAdjustedTime()));
while ( GetAdjustedTime()+30 < pblock->nTime )
{
sleep(30);
fprintf(stderr,"%d ",(int32_t)(pblock->nTime - GetAdjustedTime()));
}
fprintf(stderr,"finished waiting\n");
//sleep(pblock->nTime - GetAdjustedTime());
}
//printf("PoS ht.%d t%u\n",(int32_t)chainActive.Tip()->nHeight+1,blocktime);
} else return(0); //fprintf(stderr,"no utxos eligible for staking\n");
}