Browse Source

Try to set KMD Notary seasons correctly with our hardfork height

pull/58/head
Duke Leto 5 years ago
parent
commit
4c42d5f93f
  1. 6
      src/komodo_bitcoind.h
  2. 7
      src/komodo_defs.h
  3. 1
      src/komodo_globals.h

6
src/komodo_bitcoind.h

@ -700,12 +700,12 @@ bool komodo_checkopret(CBlock *pblock, CScript &merkleroot)
return(merkleroot.IsOpReturn() && merkleroot == komodo_makeopret(pblock, false));
}
#define HUSH_HARDFORK1 (162000)
extern const uint32_t nHushHardforkHeight;
bool hush_hardfork_active(uint32_t time)
{
// Approximately mid-day Jan 21 EST
return ( chainActive.Height() > HUSH_HARDFORK1);
return (chainActive.Height() > nHushHardforkHeight);
}
bool MarmaraPoScheck(char *destaddr,CScript opret,CTransaction staketx);

7
src/komodo_defs.h

@ -50,11 +50,14 @@
#define NUM_KMD_SEASONS 4
#define NUM_KMD_NOTARIES 64
extern const uint32_t nStakedDecemberHardforkTimestamp; //December 2019 hardfork
// Approximately mid-day Jan 21 EST
const uint32_t nHushHardforkHeight = 162000;
extern const int32_t nDecemberHardforkHeight; //December 2019 hardfork
const uint32_t nStakedDecemberHardforkTimestamp = 1576840000; //December 2019 hardfork 12/20/2019 @ 11:06am (UTC)
static const uint32_t KMD_SEASON_TIMESTAMPS[NUM_KMD_SEASONS] = {1525132800, 1563148800, nStakedDecemberHardforkTimestamp, 1751328000};
static const int32_t KMD_SEASON_HEIGHTS[NUM_KMD_SEASONS] = {814000, 1444000, nDecemberHardforkHeight, 7113400};
static const int32_t KMD_SEASON_HEIGHTS[NUM_KMD_SEASONS] = {1,2,nHushHardforkHeight, 5*nHushHardforkHeight};
// Era array of pubkeys. Add extra seasons to bottom as requried, after adding appropriate info above.
static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] =

1
src/komodo_globals.h

@ -43,7 +43,6 @@ int32_t NUM_PRICES; uint32_t *PVALS;
struct knotaries_entry *Pubkeys;
struct komodo_state KOMODO_STATES[34];
const uint32_t nStakedDecemberHardforkTimestamp = 1576840000; //December 2019 hardfork 12/20/2019 @ 11:06am (UTC)
const int32_t nDecemberHardforkHeight = 1670000; //December 2019 hardfork
#define _COINBASE_MATURITY 100

Loading…
Cancel
Save