diff --git a/params/config.go b/params/config.go index e614096b09..06e9498105 100644 --- a/params/config.go +++ b/params/config.go @@ -157,6 +157,8 @@ var ( AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), PrivatePIP7ChainID, "lat", "", big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), &CbftConfig{Period: 3}, FORKVERSION_1_5_0, sync.RWMutex{}} PrivatePIP7ChainID = new(big.Int).SetUint64(2203181) + + MainPIP7ChainID = new(big.Int).SetUint64(210425) ) // TrustedCheckpoint represents a set of post-processed trie roots (CHT and diff --git a/x/plugin/gov_plugin.go b/x/plugin/gov_plugin.go index b3539ebd4f..9f11bb54bf 100644 --- a/x/plugin/gov_plugin.go +++ b/x/plugin/gov_plugin.go @@ -149,7 +149,7 @@ func (govPlugin *GovPlugin) BeginBlock(blockHash common.Hash, header *types.Head } log.Info("Successfully upgraded the new version 1.3.0", "blockNumber", blockNumber, "blockHash", blockHash, "preActiveProposalID", preActiveVersionProposalID) } - if versionProposal.NewVersion == params.FORKVERSION_1_5_0 { + if versionProposal.NewVersion == params.FORKVERSION_1_5_0 && govPlugin.chainConfig.PIP7ChainID.Cmp(params.MainPIP7ChainID) == 0 { if err := gov.UpdateGovernParamValue(gov.ModuleStaking, gov.KeyMaxValidators, fmt.Sprint(xcom.MaxValidatorsForVersion150), blockNumber+1, blockHash); err != nil { return err }