From c506035af6723a79f7a2c9517eeebc3d1d9239af Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 2 Feb 2017 18:13:52 +0200 Subject: [PATCH] test --- src/komodo_notary.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 8a717eb78..ec0e5b20d 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -228,6 +228,15 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33) printf("komodo_chosennotary ht.%d illegal\n",height); return(-1); } + if ( height >= 180000 ) + { + if ( (*notaryidp= komodo_electednotary(pubkey33,height)) >= 0 ) + { + numnotaries = (int32_t)(sizeof(Notaries_elected)/sizeof(*Notaries_elected)); + modval = ((height % numnotaries) == *notaryidp); + return(modval); + } + } htind = height / KOMODO_ELECTION_GAP; pthread_mutex_lock(&komodo_mutex); HASH_FIND(hh,Pubkeys[htind].Notaries,pubkey33,33,kp);