@@ -2,11 +2,9 @@ package app
22
33import (
44 "context"
5- "fmt"
6- "strings"
7-
85 storetypes "cosmossdk.io/store/types"
96 upgradetypes "cosmossdk.io/x/upgrade/types"
7+ "fmt"
108 sdk "github.com/cosmos/cosmos-sdk/types"
119 m "github.com/cosmos/cosmos-sdk/types/module"
1210 "github.com/cosmos/cosmos-sdk/version"
@@ -18,38 +16,7 @@ const (
1816
1917// generate upgrade version from the current version (v999999.999999.999999 => v999999)
2018func generateUpgradeVersion () string {
21- currentVersion := version .Version
22- // if current version empty then override it with localnet version
23- if currentVersion == "v" {
24- currentVersion = "v999999.999999.999999"
25- }
26- parts := strings .Split (currentVersion , "." )
27- // Needed for devnet
28- if len (parts ) == 1 {
29- return currentVersion
30- }
31- if len (parts ) != 3 {
32- panic (fmt .Sprintf ("Invalid version format: %s. Expected format: vX.Y.Z" , currentVersion ))
33- }
34- majorVersion := strings .TrimPrefix (parts [0 ], "v" )
35- minorVersion := parts [1 ]
36- // required for testnet
37- patchParts := strings .Split (parts [2 ], "-" )
38- rcVersion := ""
39- if len (patchParts ) > 1 {
40- rcVersion = strings .Join (patchParts [1 :], "-" )
41- }
42- // testnet
43- if rcVersion != "" {
44- if minorVersion != "0" && minorVersion != "999999" {
45- return fmt .Sprintf ("v%s.%s-%s" , majorVersion , minorVersion , rcVersion )
46- }
47- return fmt .Sprintf ("v%s-%s" , majorVersion , rcVersion )
48- }
49- if minorVersion != "0" && minorVersion != "999999" {
50- return fmt .Sprintf ("v%s.%s" , majorVersion , parts [1 ])
51- }
52- return fmt .Sprintf ("v%s" , majorVersion )
19+ return "v6.5"
5320}
5421
5522func (app * ElysApp ) setUpgradeHandler () {
0 commit comments