Browse Source

test

pull/4/head
jl777 8 years ago
parent
commit
b5f08ccf9c
  1. 2
      src/komodo_notary.h

2
src/komodo_notary.h

@ -135,6 +135,8 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33)
// -1 if not notary, 0 if notary, 1 if special notary
struct knotary_entry *kp; int32_t numnotaries,modval = -1;
*notaryidp = -1;
if ( height < 0 || height/KOMODO_ELECTION_GAP >= sizeof(Pubkeys)/sizeof(*Pubkeys) )
return(-1);
pthread_mutex_lock(&komodo_mutex);
HASH_FIND(hh,Pubkeys[height/KOMODO_ELECTION_GAP].Notaries,pubkey33,33,kp);
pthread_mutex_unlock(&komodo_mutex);

Loading…
Cancel
Save