Tipdiff decay
This commit is contained in:
@@ -1920,8 +1920,8 @@ void static BitcoinMiner()
|
||||
if ( !TestBlockValidity(state,B, chainActive.LastTip(), true, false))
|
||||
{
|
||||
h = UintToArith256(B.GetHash());
|
||||
for (z=31; z>=0; z--)
|
||||
fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
|
||||
//for (z=31; z>=0; z--)
|
||||
// fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
|
||||
//fprintf(stderr," Invalid block mined, try again\n");
|
||||
gotinvalid = 1;
|
||||
return(false);
|
||||
|
||||
13
src/pow.cpp
13
src/pow.cpp
@@ -168,8 +168,9 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
fprintf(stderr,"%02x",((uint8_t *)&bnTarget)[z]);
|
||||
}
|
||||
fprintf(stderr," ht.%d booster triggered 2x\n",(int32_t)pindexLast->GetHeight()+1);
|
||||
flag = -1;
|
||||
}
|
||||
if ( flag == 0 )
|
||||
if ( flag <= 0 )
|
||||
{
|
||||
bnSum4 = zawy_targetMA(easy,bnSum4,4,block4diff * 5,1);
|
||||
bnSum7 = zawy_targetMA(easy,bnSum7,7,block7diff * 3,1);
|
||||
@@ -184,13 +185,13 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
flag = 1;
|
||||
bnTarget = (bnTmp + bnPrev) / arith_uint256(2);
|
||||
fprintf(stderr,"ht.%d block12diff %d vs %d, make harder\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*11);
|
||||
if ( 0 )
|
||||
if ( flag < 0 )
|
||||
{
|
||||
fprintf(stderr,"booster block3sum.%d block6sum.%d tipdiff.%d -> %d\n",block3sum,block6sum,tipdiff,1000*tipdiff/180);
|
||||
if ( 0 && 1000*tipdiff/180 < 1000 )
|
||||
//fprintf(stderr,"booster block3sum.%d block6sum.%d tipdiff.%d -> %d\n",block3sum,block6sum,tipdiff,1000*tipdiff/120);
|
||||
if ( 1000*tipdiff/120 < 1000 )
|
||||
{
|
||||
fprintf(stderr,"special booster block3sum.%d block6sum.%d tipdiff.%d -> %d\n",block3sum,block6sum,tipdiff,1000*tipdiff/180);
|
||||
bnTarget = bnTarget * arith_uint256(1000*tipdiff/180) / arith_uint256(1000);
|
||||
fprintf(stderr,"special booster block3sum.%d block6sum.%d tipdiff.%d -> %.3f\n",block3sum,block6sum,tipdiff,(double)tipdiff/120);
|
||||
bnTarget = bnTarget * arith_uint256(1000*tipdiff/120) / arith_uint256(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user