Remove dead code
This commit is contained in:
@@ -857,34 +857,6 @@ void hush_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
|
||||
}
|
||||
}
|
||||
|
||||
/*int8_t komodo_minerid(int32_t height,uint8_t *destpubkey33)
|
||||
{
|
||||
int32_t num,i,numnotaries; CBlockIndex *pindex; uint32_t timestamp=0; uint8_t pubkey33[33],pubkeys[64][33];
|
||||
if ( (pindex= chainActive[height]) != 0 )
|
||||
{
|
||||
if ( pindex->didinit != 0 )
|
||||
{
|
||||
if ( destpubkey33 != 0 )
|
||||
memcpy(destpubkey33,pindex->pubkey33,33);
|
||||
return(pindex->notaryid);
|
||||
}
|
||||
hush_index2pubkey33(pubkey33,pindex,height);
|
||||
if ( destpubkey33 != 0 )
|
||||
memcpy(destpubkey33,pindex->pubkey33,33);
|
||||
if ( pindex->didinit != 0 )
|
||||
return(pindex->notaryid);
|
||||
timestamp = pindex->GetBlockTime();
|
||||
if ( (num= hush_notaries(pubkeys,height,timestamp)) > 0 )
|
||||
{
|
||||
for (i=0; i<num; i++)
|
||||
if ( memcmp(pubkeys[i],pubkey33,33) == 0 )
|
||||
return(i);
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"komodo_minerid height.%d null pindex\n",height);
|
||||
return(hush_electednotary(&numnotaries,pubkey33,height,timestamp));
|
||||
}*/
|
||||
|
||||
int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,uint32_t blocktimes[66],int32_t *nonzpkeysp,int32_t height)
|
||||
{
|
||||
// after the season HF block ALL new notaries instantly become elegible.
|
||||
|
||||
@@ -87,7 +87,7 @@ int32_t getacseason(uint32_t timestamp)
|
||||
int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
|
||||
{
|
||||
int32_t i,htind,n; uint64_t mask = 0; struct knotary_entry *kp,*tmp;
|
||||
static uint8_t kmd_pubkeys[NUM_HUSH_SEASONS][64][33],didinit[NUM_HUSH_SEASONS];
|
||||
static uint8_t hush_pubkeys[NUM_HUSH_SEASONS][64][33],didinit[NUM_HUSH_SEASONS];
|
||||
|
||||
if ( timestamp == 0 && SMART_CHAIN_SYMBOL[0] != 0 ) {
|
||||
timestamp = hush_heightstamp(height);
|
||||
@@ -104,16 +104,16 @@ int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
|
||||
if ( didinit[hush_season-1] == 0 )
|
||||
{
|
||||
for (i=0; i<NUM_HUSH_NOTARIES; i++)
|
||||
decode_hex(kmd_pubkeys[hush_season-1][i],33,(char *)notaries_elected[hush_season-1][i][1]);
|
||||
decode_hex(hush_pubkeys[hush_season-1][i],33,(char *)notaries_elected[hush_season-1][i][1]);
|
||||
if ( ASSETCHAINS_PRIVATE != 0 )
|
||||
{
|
||||
// we need to populate the address array for the notary exemptions.
|
||||
for (i = 0; i<NUM_HUSH_NOTARIES; i++)
|
||||
pubkey2addr((char *)NOTARY_ADDRESSES[hush_season-1][i],(uint8_t *)kmd_pubkeys[hush_season-1][i]);
|
||||
pubkey2addr((char *)NOTARY_ADDRESSES[hush_season-1][i],(uint8_t *)hush_pubkeys[hush_season-1][i]);
|
||||
}
|
||||
didinit[hush_season-1] = 1;
|
||||
}
|
||||
memcpy(pubkeys,kmd_pubkeys[hush_season-1],NUM_HUSH_NOTARIES * 33);
|
||||
memcpy(pubkeys,hush_pubkeys[hush_season-1],NUM_HUSH_NOTARIES * 33);
|
||||
return(NUM_HUSH_NOTARIES);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user