This commit is contained in:
jl777
2017-02-02 20:41:31 +02:00
parent 8c654ec508
commit dac1ef8881

View File

@@ -616,7 +616,7 @@ int32_t komodo_electednotary(uint8_t *pubkey33,int32_t height);
int8_t komodo_minerid(int32_t height,uint8_t *pubkey33) int8_t komodo_minerid(int32_t height,uint8_t *pubkey33)
{ {
int32_t num,i; CBlockIndex *pindex; uint8_t _pubkey33[33],pubkeys[64][33]; int32_t num,i; CBlockIndex *pindex; uint8_t _pubkey33[33],pubkeys[64][33];
/*if ( (pindex= chainActive[height]) != 0 ) if ( (pindex= chainActive[height]) != 0 )
{ {
if ( pubkey33 == 0 ) if ( pubkey33 == 0 )
{ {
@@ -629,13 +629,13 @@ int8_t komodo_minerid(int32_t height,uint8_t *pubkey33)
if ( memcmp(pubkeys[i],pubkey33,33) == 0 ) if ( memcmp(pubkeys[i],pubkey33,33) == 0 )
return(i); return(i);
} }
}*/ }
return(komodo_electednotary(pubkey33,height)); return(komodo_electednotary(pubkey33,height));
} }
int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *nonzpkeysp,int32_t height) int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *nonzpkeysp,int32_t height)
{ {
int32_t i,duplicate; CBlockIndex *pindex; uint8_t pubkey33[33]; int32_t i,j,duplicate; CBlockIndex *pindex; uint8_t pubkey33[33];
memset(mids,-1,sizeof(*mids)*66); memset(mids,-1,sizeof(*mids)*66);
pindex = komodo_chainactive(height); pindex = komodo_chainactive(height);
for (i=duplicate=0; i<66; i++) for (i=duplicate=0; i<66; i++)