Remove miner locks

This commit is contained in:
jl777
2018-07-08 16:50:11 -11:00
parent 4646f21b5b
commit 41e9c81549

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,8 @@ void static BitcoinMiner()
}
else
{
while ( GetAdjustedTime() < B.nTime )
sleep(1);
//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]);