From b8b099ffbaf88b8a78a19168a1a37aa952dbce8e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 15 Apr 2018 22:19:38 +0300 Subject: [PATCH] Fix n -> static n0/n1 --- src/komodo_notary.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index e7ae7d738..0de2a2c22 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -202,7 +202,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; + static uint8_t elected_pubkeys0[64][33],elected_pubkeys1[64][33],did0,did1,n0,n1; 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); @@ -214,29 +214,30 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam { if ( did0 == 0 ) { - n = (int32_t)(sizeof(Notaries_elected0)/sizeof(*Notaries_elected0)); - for (i=0; i= KOMODO_MAXBLOCKS / KOMODO_ELECTION_GAP )