diff --git a/src/chainparams.cpp b/src/chainparams.cpp index fd960d199c3..03e97c81cce 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -812,6 +812,17 @@ void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args) consensus.DakotaCrescentHeight = static_cast(height); } + if (gArgs.IsArgSet("-eunosheight")) { + int64_t height = gArgs.GetArg("-eunosheight", consensus.EunosHeight); + if (height < -1 || height >= std::numeric_limits::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::max(); + } + consensus.EunosHeight = static_cast(height); + } + if (!args.IsArgSet("-vbparams")) return; for (const std::string& strDeployment : args.GetArgs("-vbparams")) { diff --git a/src/init.cpp b/src/init.cpp index bf8ae9a47c7..376828d8d8b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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); diff --git a/test/functional/feature_oracles.py b/test/functional/feature_oracles.py index b0e48bf7d31..edb0b4c7675 100644 --- a/test/functional/feature_oracles.py +++ b/test/functional/feature_oracles.py @@ -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")