Fix miner bug

This commit is contained in:
jl777 2019-08-01 12:57:43 -11:00
parent e58b81a475
commit 527ee64eb3
2 changed files with 2 additions and 0 deletions

View File

@ -2050,6 +2050,7 @@ void static BitcoinMiner()
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
HASHTarget.SetCompact(pblock->nBits);
hashTarget = HASHTarget;
savebits = pblock->nBits;
//hashTarget = HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
}
/*if ( NOTARY_PUBKEY33[0] == 0 )

View File

@ -112,6 +112,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
{
bnTarget = easy;
fprintf(stderr,"cmp.%d mult.%d ht.%d -> easy target\n",mult>1,(int32_t)mult,(int32_t)pindexLast->GetHeight());
return(KOMODO_MINDIFF_NBITS);
} else fprintf(stderr,"cmp.%d mult.%d for ht.%d\n",mult>1,(int32_t)mult,(int32_t)pindexLast->GetHeight());
nbits = bnTarget.GetCompact();
}