This commit is contained in:
jl777
2017-02-02 21:41:24 +02:00
parent 448b1642ba
commit 3c525df16f
2 changed files with 3 additions and 5 deletions

View File

@@ -637,10 +637,9 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non
{
int32_t i,j,duplicate; CBlockIndex *pindex; uint8_t pubkey33[33];
memset(mids,-1,sizeof(*mids)*66);
pindex = komodo_chainactive(height);
for (i=duplicate=0; i<66; i++)
{
if ( pindex != 0 )
if ( (pindex= komodo_chainactive(height-i)) != 0 )
{
komodo_index2pubkey33(pubkey33,pindex,height-i);
for (j=0; j<33; j++)
@@ -652,8 +651,7 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non
}
if ( mids[0] >= 0 && i > 0 && mids[i] == mids[0] )
duplicate++;
pindex = pindex->pprev;
} else break;
}
}
if ( i == 66 && duplicate == 0 && *nonzpkeysp > 0 )
return(1);

View File

@@ -133,7 +133,7 @@ int32_t komodo_electednotary(uint8_t *pubkey33,int32_t height)
{
if ( strcmp(pubkeystr,(char *)Notaries_elected[i][1]) == 0 )
{
printf("i.%d -> elected %s\n",i,(char *)Notaries_elected[i][1]);
//printf("i.%d -> elected %s\n",i,(char *)Notaries_elected[i][1]);
return(i);
}
}