Zawys new algo
1) FTL 4 seconds 2) MTP from 11 -> 1 3) must calc MAX(diff[I]) for past 11 blocks 4) bnTarget *= mult*mult 5) bnTarget.nBits -> onchain
This commit is contained in:
@@ -1452,8 +1452,8 @@ void static BitcoinMiner_noeq()
|
||||
HASHTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
|
||||
LogPrintf("Block %d : PoS %d%% vs target %d%%\n", Mining_height, percPoS, (int32_t)ASSETCHAINS_STAKED);
|
||||
}
|
||||
else if ( ASSETCHAINS_ADAPTIVEPOW > 0 && ASSETCHAINS_STAKED == 0 )
|
||||
HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 && ASSETCHAINS_STAKED == 0 )
|
||||
// HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -1487,8 +1487,8 @@ void static BitcoinMiner_noeq()
|
||||
}
|
||||
else if ( ASSETCHAINS_STAKED == 100 && Mining_height > 100 )
|
||||
hashTarget = HASHTarget;
|
||||
else if ( ASSETCHAINS_ADAPTIVEPOW > 0 && ASSETCHAINS_STAKED == 0 )
|
||||
hashTarget = HASHTarget_POW;
|
||||
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 && ASSETCHAINS_STAKED == 0 )
|
||||
// hashTarget = HASHTarget_POW;
|
||||
|
||||
// for speed check NONCEMASK at a time
|
||||
for (i = 0; i < count; i++)
|
||||
@@ -1825,8 +1825,8 @@ void static BitcoinMiner()
|
||||
if ( ASSETCHAINS_STAKED < 100 )
|
||||
LogPrintf("Block %d : PoS %d%% vs target %d%% \n",Mining_height,percPoS,(int32_t)ASSETCHAINS_STAKED);
|
||||
}
|
||||
else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
// HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
gotinvalid = 0;
|
||||
while (true)
|
||||
{
|
||||
@@ -1854,8 +1854,8 @@ void static BitcoinMiner()
|
||||
arith_uint256 hashTarget;
|
||||
if ( KOMODO_MININGTHREADS > 0 && ASSETCHAINS_STAKED > 0 && ASSETCHAINS_STAKED < 100 && Mining_height > 10 )
|
||||
hashTarget = HASHTarget_POW;
|
||||
else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
hashTarget = HASHTarget_POW;
|
||||
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
// hashTarget = HASHTarget_POW;
|
||||
else hashTarget = HASHTarget;
|
||||
std::function<bool(std::vector<unsigned char>)> validBlock =
|
||||
#ifdef ENABLE_WALLET
|
||||
@@ -2048,7 +2048,8 @@ void static BitcoinMiner()
|
||||
if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
{
|
||||
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
|
||||
hashTarget = HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
HASHTarget.SetCompact(pblock->nBits);
|
||||
//hashTarget = HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||
}
|
||||
/*if ( NOTARY_PUBKEY33[0] == 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user