|
|
@ -129,7 +129,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height) |
|
|
|
|
|
|
|
void komodo_notarysinit(int32_t height,uint8_t pubkeys[64][33],int32_t num) |
|
|
|
{ |
|
|
|
static int32_t hwmheight; |
|
|
|
int32_t k,i,htind; struct knotary_entry *kp; struct knotaries_entry N; |
|
|
|
if ( height <= hwmheight ) |
|
|
|
return; |
|
|
|
hwmheight = height; |
|
|
|
memset(&N,0,sizeof(N)); |
|
|
|
pthread_mutex_lock(&komodo_mutex); |
|
|
|
for (k=0; k<num; k++) |
|
|
@ -138,7 +142,7 @@ void komodo_notarysinit(int32_t height,uint8_t pubkeys[64][33],int32_t num) |
|
|
|
memcpy(kp->pubkey,pubkeys[k],33); |
|
|
|
kp->notaryid = k; |
|
|
|
HASH_ADD_KEYPTR(hh,N.Notaries,kp->pubkey,33,kp); |
|
|
|
if ( height > 10000 ) |
|
|
|
if ( height > 0 ) |
|
|
|
{ |
|
|
|
for (i=0; i<33; i++) |
|
|
|
printf("%02x",pubkeys[k][i]); |
|
|
|