This commit is contained in:
jl777
2018-04-13 13:44:33 +03:00
parent c8f73c1d21
commit 82f82d3f08
2 changed files with 19 additions and 5 deletions

View File

@@ -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(&notaryid,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);