From 050cb9a331e773319cec7d8490f4ef4ba62c4ebb Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 17 Nov 2016 20:49:41 -0300 Subject: [PATCH] test --- src/komodo_notary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 1e87bf7b3..3ef45a6ab 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -164,7 +164,7 @@ 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,htind,modval = -1; *notaryidp = -1; - if ( height < 0 || height/KOMODO_ELECTION_GAP >= sizeof(Pubkeys)/sizeof(*Pubkeys) ) + if ( height < 0 || height >= KOMODO_MAXBLOCKS ) return(-1); htind = height / KOMODO_ELECTION_GAP; pthread_mutex_lock(&komodo_mutex);