Merge pull request #742 from jl777/jl777

Jl777
This commit is contained in:
jl777
2018-07-08 16:53:37 -11:00
committed by GitHub

View File

@@ -425,7 +425,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
if ( (siglen= komodo_staked(txStaked,pblock->nBits,&blocktime,&txtime,&utxotxid,&utxovout,&utxovalue,utxosig)) > 0 )
{
CAmount txfees = 0;
if ( (int32_t)chainActive.Tip()->nHeight+1 > 100 && GetAdjustedTime() < blocktime-30 )
if ( (int32_t)chainActive.Tip()->nHeight+1 > 100 && GetAdjustedTime() < blocktime-57 )
return(0);
pblock->vtx.push_back(txStaked);
pblocktemplate->vTxFees.push_back(txfees);
@@ -975,7 +975,7 @@ void static BitcoinMiner()
fprintf(stderr," POW\n");*/
if ( h > hashTarget )
return false;
if ( B.nTime > GetAdjustedTime() )
if ( IS_KOMODO_NOTARY != 0 && B.nTime > GetAdjustedTime() )
{
//fprintf(stderr,"need to wait %d seconds to submit block\n",(int32_t)(B.nTime - GetAdjustedTime()));
while ( GetAdjustedTime() < B.nTime-2 )
@@ -999,8 +999,13 @@ void static BitcoinMiner()
}
else
{
while ( GetAdjustedTime() < B.nTime )
while ( B.nTime-57 > GetAdjustedTime() )
sleep(1);
if ( Mining_height < 6000 )
{
while ( B.nTime > GetAdjustedTime() )
sleep(1);
}
uint256 tmp = B.GetHash();
int32_t z; for (z=31; z>=0; z--)
fprintf(stderr,"%02x",((uint8_t *)&tmp)[z]);