From da58058de8823ec251d0a1b373bf4cfc8da8f953 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 15 Apr 2018 22:23:00 +0300 Subject: [PATCH] N -> static n0/n1 --- src/komodo_notary.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index ccb4ef859..0de2a2c22 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -203,7 +203,7 @@ uint32_t komodo_heightstamp(int32_t height); int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp) { static uint8_t elected_pubkeys0[64][33],elected_pubkeys1[64][33],did0,did1,n0,n1; - int32_t i,htind; uint64_t mask = 0; struct knotary_entry *kp,*tmp; + int32_t i,htind,n; uint64_t mask = 0; struct knotary_entry *kp,*tmp; if ( timestamp == 0 && ASSETCHAINS_SYMBOL[0] != 0 ) timestamp = komodo_heightstamp(height); else if ( ASSETCHAINS_SYMBOL[0] == 0 ) @@ -222,6 +222,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam memcpy(pubkeys,elected_pubkeys0,n0 * 33); //if ( ASSETCHAINS_SYMBOL[0] != 0 ) //fprintf(stderr,"%s height.%d t.%u elected.%d notaries\n",ASSETCHAINS_SYMBOL,height,timestamp,n0); + return(n0); } else //if ( (timestamp != 0 && timestamp <= KOMODO_NOTARIES_TIMESTAMP2) || height <= KOMODO_NOTARIES_HEIGHT2 ) { @@ -235,8 +236,8 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam did1 = 1; } memcpy(pubkeys,elected_pubkeys1,n1 * 33); + return(n1); } - return(n); } htind = height / KOMODO_ELECTION_GAP; if ( htind >= KOMODO_MAXBLOCKS / KOMODO_ELECTION_GAP )