From 0b63d4f4bd5099ef6b24689debf2fd6568d75862 Mon Sep 17 00:00:00 2001 From: Diego del Corral Tercero <55594560+hidiego@users.noreply.github.com> Date: Wed, 29 Dec 2021 14:04:03 +0100 Subject: [PATCH] Adds FortCanningHillHeight (#1005) * Adds FortCanningHillHeight Co-authored-by: Jouzo --- src/chainparams.cpp | 9 +++++++-- src/consensus/params.h | 1 + src/init.cpp | 1 + src/rpc/blockchain.cpp | 1 + test/functional/rpc_blockchain.py | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 0a7dd6f801..c416f00f1a 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -128,6 +128,7 @@ class CMainParams : public CChainParams { consensus.EunosPayaHeight = 1072000; // Aug 05, 2021. consensus.FortCanningHeight = 1367000; // Nov 15, 2021. consensus.FortCanningMuseumHeight = 1430640; + consensus.FortCanningHillHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -348,6 +349,7 @@ class CTestNetParams : public CChainParams { consensus.EunosPayaHeight = 463300; consensus.FortCanningHeight = 686200; consensus.FortCanningMuseumHeight = 724000; + consensus.FortCanningHillHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -530,6 +532,7 @@ class CDevNetParams : public CChainParams { consensus.EunosPayaHeight = 300; consensus.FortCanningHeight = std::numeric_limits::max(); consensus.FortCanningMuseumHeight = std::numeric_limits::max(); + consensus.FortCanningHillHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 5 * 60; // 5 min == 10 blocks @@ -704,6 +707,7 @@ class CRegTestParams : public CChainParams { consensus.EunosPayaHeight = 10000000; consensus.FortCanningHeight = 10000000; consensus.FortCanningMuseumHeight = 10000000; + consensus.FortCanningHillHeight = 10000000; consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -915,8 +919,9 @@ void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args) consensus.EunosKampungHeight = static_cast(eunosHeight.get()); } UpdateHeightValidation("Eunos Paya", "-eunospayaheight", consensus.EunosPayaHeight); - UpdateHeightValidation("Fork canning", "-fortcanningheight", consensus.FortCanningHeight); - UpdateHeightValidation("Fork canning museum", "-fortcanningmuseumheight", consensus.FortCanningMuseumHeight); + UpdateHeightValidation("Fort canning", "-fortcanningheight", consensus.FortCanningHeight); + UpdateHeightValidation("Fort canning museum", "-fortcanningmuseumheight", consensus.FortCanningMuseumHeight); + UpdateHeightValidation("Fort canning hill", "-fortcanninghillheight", consensus.FortCanningHillHeight); if (!args.IsArgSet("-vbparams")) return; diff --git a/src/consensus/params.h b/src/consensus/params.h index 28caa9fe43..f2da593335 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -91,6 +91,7 @@ struct Params { int EunosPayaHeight; int FortCanningHeight; int FortCanningMuseumHeight; + int FortCanningHillHeight; /** Foundation share after AMK, normalized to COIN = 100% */ CAmount foundationShareDFIP1; diff --git a/src/init.cpp b/src/init.cpp index 3660aedad7..5e404ceebc 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -473,6 +473,7 @@ void SetupServerArgs() gArgs.AddArg("-eunospayaheight", "EunosPaya fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningheight", "Fort Canning fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningmuseumheight", "Fort Canning Museum fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-fortcanninghillheight", "Fort Canning Hill fork activation height (regtest only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-jellyfish_regtest", "Configure the regtest network for jellyfish testing", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); #ifdef USE_UPNP #if USE_UPNP diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index ca929e0c66..1c17234ce6 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1362,6 +1362,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request) BuriedForkDescPushBack(softforks, "eunospaya", consensusParams.EunosPayaHeight); BuriedForkDescPushBack(softforks, "fortcanning", consensusParams.FortCanningHeight); BuriedForkDescPushBack(softforks, "fortcanningmuseum", consensusParams.FortCanningMuseumHeight); + BuriedForkDescPushBack(softforks, "fortcanninghill", consensusParams.FortCanningHillHeight); BIP9SoftForkDescPushBack(softforks, "testdummy", consensusParams, Consensus::DEPLOYMENT_TESTDUMMY); obj.pushKV("softforks", softforks); diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index e0860f316a..7932038eef 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -133,6 +133,7 @@ def _test_getblockchaininfo(self): 'eunospaya': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanning': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanningmuseum': {'type': 'buried', 'active': False, 'height': 10000000}, + 'fortcanninghill': {'type': 'buried', 'active': False, 'height': 10000000}, 'testdummy': { 'type': 'bip9', 'bip9': {