Test
This commit is contained in:
@@ -414,25 +414,14 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||||||
if ( (siglen= komodo_staked(txStaked,pblock->nBits,&blocktime,&txtime,&utxotxid,&utxovout,&utxovalue,utxosig)) > 0 )
|
if ( (siglen= komodo_staked(txStaked,pblock->nBits,&blocktime,&txtime,&utxotxid,&utxovout,&utxovalue,utxosig)) > 0 )
|
||||||
{
|
{
|
||||||
CAmount txfees = 0;
|
CAmount txfees = 0;
|
||||||
if ( GetAdjustedTime() < blocktime-30 )
|
if ( GetAdjustedTime() < blocktime-13 )
|
||||||
return(0);
|
return(0);
|
||||||
pblock->vtx.push_back(txStaked);
|
pblock->vtx.push_back(txStaked);
|
||||||
pblocktemplate->vTxFees.push_back(txfees);
|
pblocktemplate->vTxFees.push_back(txfees);
|
||||||
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked));
|
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked));
|
||||||
nFees += txfees;
|
nFees += txfees;
|
||||||
pblock->nTime = blocktime;
|
pblock->nTime = blocktime;
|
||||||
printf("PoS ht.%d t%u\n",(int32_t)chainActive.Tip()->nHeight+1,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());
|
|
||||||
}
|
|
||||||
} else return(0); //fprintf(stderr,"no utxos eligible for staking\n");
|
} else return(0); //fprintf(stderr,"no utxos eligible for staking\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user