Test
This commit is contained in:
@@ -850,10 +850,10 @@ int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width) // depre
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],uint32_t blocktimes[66],int32_t height,uint8_t pubkey33[33],uint32_t tiptime,uint32_t blocktime)
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],uint32_t blocktimes[66],int32_t height,uint8_t pubkey33[33],uint32_t blocktime)
|
||||
{
|
||||
int32_t i,j,notaryid=0,minerid,limit,nid; uint8_t destpubkey33[33];
|
||||
komodo_chosennotary(¬aryid,height,pubkey33,tiptime);
|
||||
komodo_chosennotary(¬aryid,height,pubkey33,blocktimes[0]);
|
||||
if ( height >= 82000 )
|
||||
{
|
||||
if ( notaryid >= 0 )
|
||||
@@ -870,7 +870,7 @@ int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],uint32_t bloc
|
||||
else break;
|
||||
}
|
||||
}
|
||||
if ( blocktime < blocktimes[1]+60 )
|
||||
if ( blocktime < blocktimes[1]+57 )
|
||||
{
|
||||
fprintf(stderr,"lag.%d ht.%d n.%d blocktimes[%u vs %u %u]\n",blocktime-blocktimes[1],height,notaryid,blocktime,blocktimes[0],blocktimes[1]);
|
||||
} else return(1);
|
||||
|
||||
@@ -117,7 +117,7 @@ bool CheckEquihashSolution(const CBlockHeader *pblock, const CChainParams& param
|
||||
}
|
||||
|
||||
int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,uint32_t timestamp);
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],uint32_t blocktimes[66],int32_t height,uint8_t pubkey33[33],uint32_t tiptime,uint32_t blocktime);
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],uint32_t blocktimes[66],int32_t height,uint8_t pubkey33[33],uint32_t blocktime);
|
||||
int32_t komodo_currentheight();
|
||||
CBlockIndex *komodo_chainactive(int32_t height);
|
||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
@@ -155,11 +155,11 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
|
||||
}
|
||||
if ( nonz == 0 )
|
||||
{
|
||||
//fprintf(stderr,"ht.%d null pubkey checkproof return\n",height);
|
||||
fprintf(stderr,"ht.%d null pubkey checkproof return\n",height);
|
||||
return(true); // will come back via different path with pubkey set
|
||||
}
|
||||
flag = komodo_eligiblenotary(pubkeys,mids,blocktimes,&nonzpkeys,height);
|
||||
special2 = komodo_is_special(pubkeys,mids,blocktimes,height,pubkey33,tiptime,blocktime);
|
||||
special2 = komodo_is_special(pubkeys,mids,blocktimes,height,pubkey33,blocktime);
|
||||
if ( notaryid >= 0 )
|
||||
{
|
||||
if ( height > 10000 && height < 80000 && (special != 0 || special2 > 0) )
|
||||
@@ -178,7 +178,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
|
||||
}
|
||||
if ( (flag != 0 || special2 > 0) && special2 != -2 )
|
||||
{
|
||||
//fprintf(stderr,"EASY MINING ht.%d\n",height);
|
||||
fprintf(stderr,"EASY MINING ht.%d\n",height);
|
||||
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
|
||||
}
|
||||
}
|
||||
@@ -216,6 +216,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 || height > 792000 )
|
||||
return false;
|
||||
}
|
||||
fprintf(stderr,"height.%d notaryid.%d PoW valid\n",height,notaryid);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user