Browse Source

test

pull/4/head
jl777 7 years ago
parent
commit
212b5a730b
  1. 3
      src/komodo_bitcoind.h
  2. 10
      src/komodo_notary.h

3
src/komodo_bitcoind.h

@ -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)

10
src/komodo_notary.h

@ -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;

Loading…
Cancel
Save