From 080881348b3899bd3900dcf590e2f7cfab57fa4a Mon Sep 17 00:00:00 2001 From: j75689 Date: Wed, 20 Sep 2023 11:54:12 +0800 Subject: [PATCH 1/2] feat: add Nagqu fork to mainnet --- x/upgrade/types/upgrade_config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x/upgrade/types/upgrade_config.go b/x/upgrade/types/upgrade_config.go index 659e1c72c1..eba8205025 100644 --- a/x/upgrade/types/upgrade_config.go +++ b/x/upgrade/types/upgrade_config.go @@ -16,6 +16,13 @@ const ( // The default upgrade config for networks var ( + MainnetChainID = "greenfield_1017-1" + MainnetConfig = NewUpgradeConfig().SetPlan(&Plan{ + Name: Nagqu, + Height: 1, + Info: "Nagqu hardfork", + }) + TestnetChainID = "greenfield_5600-1" TestnetConfig = NewUpgradeConfig().SetPlan(&Plan{ Name: Nagqu, From 5548427ee360939df1a6c252b7dcc1fd7688a81a Mon Sep 17 00:00:00 2001 From: j75689 Date: Sat, 7 Oct 2023 09:59:32 +0800 Subject: [PATCH 2/2] fix: default mainnet hardfork config --- x/upgrade/keeper/keeper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 2f492123ff..e4aa18f03b 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -462,6 +462,8 @@ func (keeper *Keeper) RegisterUpgradePlan(chianID string, plans []serverconfig.U // getExistChainConfig returns the exist chain config func getExistChainConfig(chainID string) *types.UpgradeConfig { switch chainID { + case types.MainnetChainID: + return types.MainnetConfig case types.TestnetChainID: return types.TestnetConfig default: