From de230f5e7579d59480440e73e5adf89697b4f1da Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 8 May 2018 19:05:38 +0300 Subject: [PATCH] Test --- src/miner.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 9c84f5f28..264a6e2d4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -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"); }