This commit is contained in:
jl777
2017-02-02 15:45:42 +02:00
parent 5d7f3d0c44
commit 212b5a730b
2 changed files with 12 additions and 1 deletions

View File

@@ -606,6 +606,7 @@ void komodo_connectpindex(CBlockIndex *pindex)
}
int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height);
int32_t komodo_electednotary(uint8_t *pubkey33);
int8_t komodo_minerid(int32_t height)
{
@@ -620,7 +621,7 @@ int8_t komodo_minerid(int32_t height)
return(i);
}
}
return(-1);
return(komodo_electednotary(pubkey33));
}
int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width)

View File

@@ -122,6 +122,16 @@ const char *Notaries_elected[][2] =
{ "xxspot2_XX", "03d85b221ea72ebcd25373e7961f4983d12add66a92f899deaf07bab1d8b6f5573" }
};
int32_t komodo_electednotary(uint8_t *pubkey33)
{
char pubkeystr[67];
init_hexbytes_noT(pubkeystr,pubkey33,33);
for (i=0; i<sizeof(Notaries_elected)/sizeof(*Notaries_elected); i++)
if ( strcmp(pubkeystr,Notaries_elected[i]) == 0 )
return(i);
return(-1);
}
int32_t komodo_ratify_threshold(int32_t height,uint64_t signedmask)
{
int32_t htind,numnotaries,i,wt = 0;