Change notary season detection by block height for HUSH
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
// Copyright (c) 2019 The Hush developers
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Copyright © 2014-2019 The SuperNET Developers. *
|
* Copyright © 2014-2019 The SuperNET Developers. *
|
||||||
* *
|
* *
|
||||||
@@ -13,12 +14,9 @@
|
|||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include "komodo_defs.h"
|
#include "komodo_defs.h"
|
||||||
#include "komodo_cJSON.h"
|
#include "komodo_cJSON.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define KOMODO_MAINNET_START 178999
|
#define KOMODO_MAINNET_START 178999
|
||||||
#define KOMODO_NOTARIES_HEIGHT1 814000
|
#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 )
|
if ( is_STAKED(ASSETCHAINS_SYMBOL) == 0 )
|
||||||
{
|
{
|
||||||
int32_t kmd_season = 0;
|
int32_t kmd_season = 0;
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
bool ishush3 = strncmp(ASSETCHAINS_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
||||||
{
|
if ( ishush3 ) {
|
||||||
// This is KMD, use block heights to determine the KMD notary season..
|
// This is HUSH, use block heights to determine the notary season..
|
||||||
if ( height >= KOMODO_NOTARIES_HARDCODED )
|
kmd_season = getkmdseason(height);
|
||||||
kmd_season = getkmdseason(height);
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Use timestamp to detemine notary pubkeys.
|
// Use timestamp to detemine notary pubkeys.
|
||||||
kmd_season = getacseason(timestamp);
|
kmd_season = getacseason(timestamp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user