Browse Source

Change notary season detection by block height for HUSH

pull/58/head
Duke Leto 5 years ago
parent
commit
778e094a32
  1. 17
      src/komodo_notary.h

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

Loading…
Cancel
Save