From 67d135df57a039359832c7f83d4c6efedd95c489 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 14 Nov 2016 13:13:46 -0300 Subject: [PATCH] test --- src/komodo_notary.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 8afa32968..7e5899b86 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -53,7 +53,13 @@ const char *Notaries_genesis[][2] = }; #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)) + +int32_t KOMODO_PUBKEYS_HEIGHT(int32_t height) +{ + height += KOMODO_ELECTION_GAP/2; + height /= KOMODO_ELECTION_GAP; + return((height + 1) * KOMODO_ELECTION_GAP); +} struct nutxo_entry { UT_hash_handle hh; uint256 txhash; uint64_t voutmask; int32_t notaryid,height; } *NUTXOS; struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; };