From d01ec1158cf3743f5d13cc66247edceb247ed603 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 14 Nov 2016 12:51:58 -0300 Subject: [PATCH] test --- src/komodo_notary.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 8b637db0a..26712645b 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -52,7 +52,7 @@ const char *Notaries_genesis[][2] = { "titomane_SH", "035f49d7a308dd9a209e894321f010d21b7793461b0c89d6d9231a3fe5f68d9960" }, }; -#define KOMODO_ELECTION_GAP 2000 +#define KOMODO_ELECTION_GAP ((ASSETCHAINS_SYMBOL[0] == 0) ? 2000 : 100) #define KOMODO_PUBKEYS_HEIGHT(height) ((int32_t)(((((height)+KOMODO_ELECTION_GAP*.5)/KOMODO_ELECTION_GAP) + 1) * KOMODO_ELECTION_GAP)) struct nutxo_entry { UT_hash_handle hh; uint256 txhash; uint64_t voutmask; int32_t notaryid,height; } *NUTXOS; @@ -94,8 +94,8 @@ int32_t komodo_ratify_threshold(int32_t height,uint64_t signedmask) int32_t htind,numnotaries,i,wt = 0; if ( ASSETCHAINS_SYMBOL[0] != 0 ) return(2); - if ( (htind= KOMODO_PUBKEYS_HEIGHT(height) / KOMODO_ELECTION_GAP) == 1 ) - htind = 0; + if ( (htind= KOMODO_PUBKEYS_HEIGHT(height) / KOMODO_ELECTION_GAP) == 0 ) + htind = 1; numnotaries = Pubkeys[htind].numnotaries; for (i=0; i= sizeof(Pubkeys)/sizeof(*Pubkeys) ) return(-1); - if ( (htind= KOMODO_PUBKEYS_HEIGHT(height) / KOMODO_ELECTION_GAP) == 1 ) - htind = 0; + if ( (htind= KOMODO_PUBKEYS_HEIGHT(height) / KOMODO_ELECTION_GAP) == 0 ) + htind = 1; pthread_mutex_lock(&komodo_mutex); HASH_FIND(hh,Pubkeys[htind].Notaries,pubkey33,33,kp); pthread_mutex_unlock(&komodo_mutex);