Change elements mode to activating BIP9 signaling based on height

This commit is contained in:
Gregory Sanders 2019-11-13 16:07:29 -05:00
parent f60e0684d1
commit 6fc3fe04ef
4 changed files with 32 additions and 6 deletions

View file

@ -135,6 +135,7 @@ public:
g_con_elementsmode = false;
g_con_blockheightinheader = false;
consensus.total_valid_epochs = 0;
consensus.elements_mode = g_con_elementsmode;
/**
* The message start string is designed to be unlikely to occur in normal data.
@ -265,6 +266,7 @@ public:
g_con_elementsmode = false;
g_con_blockheightinheader = false;
consensus.total_valid_epochs = 0;
consensus.elements_mode = g_con_elementsmode;
pchMessageStart[0] = 0x0b;
pchMessageStart[1] = 0x11;
@ -367,6 +369,7 @@ public:
consensus.has_parent_chain = false;
g_signed_blocks = false;
g_con_elementsmode = false;
consensus.elements_mode = g_con_elementsmode;
g_con_blockheightinheader = false;
consensus.total_valid_epochs = 0;
@ -552,6 +555,7 @@ class CCustomParams : public CRegTestParams {
// Default to true for custom chains.
g_con_blockheightinheader = args.GetBoolArg("-con_blockheightinheader", true);
g_con_elementsmode = args.GetBoolArg("-con_elementsmode", true);
consensus.elements_mode = g_con_elementsmode;
// No subsidy for custom chains by default
consensus.genesis_subsidy = args.GetArg("-con_blocksubsidy", 0);
@ -726,6 +730,7 @@ public:
g_con_blockheightinheader = true;
g_con_elementsmode = true;
consensus.elements_mode = g_con_elementsmode;
// TODO: Pick appropriate value for this network.
consensus.total_valid_epochs = 2;