Test
This commit is contained in:
@@ -840,12 +840,26 @@ int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width) // depre
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33],uint32_t timestamp)
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],int32_t height,uint8_t pubkey33[33],uint32_t timestamp)
|
||||
{
|
||||
int32_t i,notaryid=0,minerid,limit,nid; //uint8_t _pubkey33[33];
|
||||
if ( height >= 225000 )
|
||||
komodo_chosennotary(¬aryid,height,pubkey33,timestamp);
|
||||
if ( height >= 34000 && notaryid >= 0 )
|
||||
if ( height >= 700000 )
|
||||
{
|
||||
if ( mids[0] >= 0 )
|
||||
{
|
||||
for (i=1; i<66; i++)
|
||||
{
|
||||
if ( mids[i] == mids[0] )
|
||||
{
|
||||
fprintf(stderr,"ht.%d repeat notaryid.%d in mids[%d]\n",height,mids[0],i);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
} else return(0);
|
||||
}
|
||||
else if ( height >= 34000 && notaryid >= 0 )
|
||||
{
|
||||
if ( height < 79693 )
|
||||
limit = 64;
|
||||
@@ -857,7 +871,7 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33],uint32_t timestamp
|
||||
komodo_chosennotary(&nid,height-i,pubkey33,timestamp);
|
||||
if ( nid == notaryid )
|
||||
{
|
||||
//if ( (0) && notaryid > 0 )
|
||||
if ( (0) && notaryid > 0 )
|
||||
fprintf(stderr,"ht.%d notaryid.%d already mined -i.%d nid.%d\n",height,notaryid,i,nid);
|
||||
if ( height > 225000 )
|
||||
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(int32_t height,uint8_t pubkey33[33],uint32_t timestamp);
|
||||
int32_t komodo_is_special(uint8_t pubkeys[66][33],int32_t mids[66],int32_t height,uint8_t pubkey33[33],uint32_t timestamp);
|
||||
int32_t komodo_currentheight();
|
||||
CBlockIndex *komodo_chainactive(int32_t height);
|
||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
@@ -157,7 +157,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
|
||||
return(true); // will come back via different path with pubkey set
|
||||
}
|
||||
flag = komodo_eligiblenotary(pubkeys,mids,&nonzpkeys,height);
|
||||
special2 = komodo_is_special(height,pubkey33,timestamp);
|
||||
special2 = komodo_is_special(pubkeys,mids,height,pubkey33,timestamp);
|
||||
//fprintf(stderr,"ht.%d notaryid.%d special.%d flag.%d special2.%d\n",height,notaryid,special,flag,special2);
|
||||
if ( notaryid >= 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user