Skip to content

Commit

Permalink
hardfork for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
DeFiDev committed Apr 1, 2021
1 parent fd6dab1 commit a7662e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,17 @@ void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args)
consensus.DakotaCrescentHeight = static_cast<int>(height);
}

if (gArgs.IsArgSet("-eunosheight")) {
int64_t height = gArgs.GetArg("-eunosheight", consensus.EunosHeight);
if (height < -1 || height >= std::numeric_limits<int>::max()) {
throw std::runtime_error(strprintf("Activation height %ld for Eunos is out of valid range. Use -1 to disable Eunos features.", height));
} else if (height == -1) {
LogPrintf("Eunos disabled for testing\n");
height = std::numeric_limits<int>::max();
}
consensus.EunosHeight = static_cast<int>(height);
}

if (!args.IsArgSet("-vbparams")) return;

for (const std::string& strDeployment : args.GetArgs("-vbparams")) {
Expand Down
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ void SetupServerArgs()
gArgs.AddArg("-clarkequayheight", "ClarkeQuay fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
gArgs.AddArg("-dakotaheight", "Dakota fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
gArgs.AddArg("-dakotacrescentheight", "DakotaCrescent fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
gArgs.AddArg("-eunosheight", "Eunos fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
#ifdef USE_UPNP
#if USE_UPNP
gArgs.AddArg("-upnp", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
Expand Down
8 changes: 4 additions & 4 deletions test/functional/feature_oracles.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def set_test_params(self):
# node2: non foundation
self.setup_clean_chain = True
self.extra_args = [
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']]
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=1'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=1'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=1'],
['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=1']]

def create_tokens(self):
collateral0 = self.nodes[0].getnewaddress("", "legacy")
Expand Down

0 comments on commit a7662e9

Please sign in to comment.