From 2a881c3e95dac457a26e40ace900b8aa0ac26568 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 14 Nov 2016 13:09:59 -0300 Subject: [PATCH] test --- src/komodo_notary.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 1cf14a749..8afa32968 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -130,10 +130,7 @@ 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; + int32_t k,i,htind,nonz; struct knotary_entry *kp; struct knotaries_entry N; memset(&N,0,sizeof(N)); if ( (htind= KOMODO_PUBKEYS_HEIGHT(height) / KOMODO_ELECTION_GAP) == 0 ) htind = 1; @@ -148,16 +145,20 @@ void komodo_notarysinit(int32_t height,uint8_t pubkeys[64][33],int32_t num) { for (i=0; i<33; i++) printf("%02x",pubkeys[k][i]); - printf(" notarypubs.[%d] ht.%d active at %d\n",k,height,htind*KOMODO_ELECTION_GAP); + printf(" notarypubs.[%d] ht.%d active at %d\n",k,height,KOMODO_PUBKEYS_HEIGHT(height)); } } N.numnotaries = num; - for (i=htind; i hwmheight ) + hwmheight = height; } int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33) @@ -277,7 +278,7 @@ void komodo_assetchain_pubkeys(char *jsonstr) { komodo_init(-1); komodo_notarysinit(0,pubkeys,n); - printf("initialize pubkeys[%d]\n",n); + //printf("initialize pubkeys[%d]\n",n); } else fprintf(stderr,"komodo_assetchain_pubkeys i.%d vs n.%d\n",i,n); } else fprintf(stderr,"assetchain pubkeys n.%d\n",n); }