Fix miner
This commit is contained in:
@@ -2049,6 +2049,7 @@ void static BitcoinMiner()
|
|||||||
{
|
{
|
||||||
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
|
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
|
||||||
HASHTarget.SetCompact(pblock->nBits);
|
HASHTarget.SetCompact(pblock->nBits);
|
||||||
|
hashTarget = HASHTarget;
|
||||||
//hashTarget = HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
//hashTarget = HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||||
}
|
}
|
||||||
/*if ( NOTARY_PUBKEY33[0] == 0 )
|
/*if ( NOTARY_PUBKEY33[0] == 0 )
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
|||||||
if ( pindexFirst != 0 && pblock != 0 )
|
if ( pindexFirst != 0 && pblock != 0 )
|
||||||
{
|
{
|
||||||
mult = pblock->nTime - pindexFirst->nTime - 7 * ASSETCHAINS_BLOCKTIME;
|
mult = pblock->nTime - pindexFirst->nTime - 7 * ASSETCHAINS_BLOCKTIME;
|
||||||
fprintf(stderr,"ht.%d mult.%d = (%u - %u - 7x)\n",pindexLast->GetHeight(),(int32_t)mult,pblock->nTime, pindexFirst->nTime);
|
//fprintf(stderr,"ht.%d mult.%d = (%u - %u - 7x)\n",pindexLast->GetHeight(),(int32_t)mult,pblock->nTime, pindexFirst->nTime);
|
||||||
}
|
}
|
||||||
for (int i = 0; pindexFirst && i < params.nPowAveragingWindow; i++)
|
for (int i = 0; pindexFirst && i < params.nPowAveragingWindow; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user