Change notary season detection by block height for HUSH

This commit is contained in:
Duke Leto
2019-12-20 23:13:27 -05:00
parent 0ed1b74f2f
commit 778e094a32

View File

@@ -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);
}