From 778e094a32e78db0a7f1e87d3e98050b5134bb7d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 20 Dec 2019 23:13:27 -0500 Subject: [PATCH] Change notary season detection by block height for HUSH --- src/komodo_notary.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 78732826a..8114a86af 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -1,3 +1,4 @@ +// Copyright (c) 2019 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * @@ -13,12 +14,9 @@ * * ******************************************************************************/ - #include "komodo_defs.h" #include "komodo_cJSON.h" - - #define KOMODO_MAINNET_START 178999 #define KOMODO_NOTARIES_HEIGHT1 814000 @@ -101,14 +99,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam if ( is_STAKED(ASSETCHAINS_SYMBOL) == 0 ) { int32_t kmd_season = 0; - if ( ASSETCHAINS_SYMBOL[0] == 0 ) - { - // This is KMD, use block heights to determine the KMD notary season.. - if ( height >= KOMODO_NOTARIES_HARDCODED ) - kmd_season = getkmdseason(height); - } - else - { + bool ishush3 = strncmp(ASSETCHAINS_SYMBOL, "HUSH3",5) == 0 ? true : false; + if ( ishush3 ) { + // This is HUSH, use block heights to determine the notary season.. + kmd_season = getkmdseason(height); + } else { // Use timestamp to detemine notary pubkeys. kmd_season = getacseason(timestamp); }