From 72a6eb0ad2d40bff40db9922acee839792109ee9 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 20:42:29 +0700 Subject: [PATCH 1/8] add test --- app/fork_test.go | 2 -- app/forks.go | 17 ++++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/fork_test.go b/app/fork_test.go index a510f84a..f28c3c49 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -13,8 +13,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) - func TestFork(t *testing.T) { realio := Setup(false, nil) diff --git a/app/forks.go b/app/forks.go index 865c5f48..e72d6ded 100644 --- a/app/forks.go +++ b/app/forks.go @@ -1,6 +1,7 @@ package app import ( + "fmt" "sort" "time" @@ -9,6 +10,7 @@ import ( ) var ForkHeight = 5989487 +var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) // ScheduleForkUpgrade executes any necessary fork logic for based upon the current // block height and chain ID (mainnet or testnet). It sets an upgrade plan once @@ -63,11 +65,7 @@ func removeDuplicateValueRedelegationQueueKey(app *RealioNetwork, ctx sdk.Contex cdc := app.AppCodec() store := ctx.KVStore(app.keys[stakingtypes.ModuleName]) - // remove duplicate UnbondingQueueKey - ubdTime := sk.UnbondingTime(ctx) - currTime := ctx.BlockTime() - - redelegationTimesliceIterator := sk.RedelegationQueueIterator(ctx, currTime.Add(ubdTime)) // make sure to iterate all queue + redelegationTimesliceIterator := sk.RedelegationQueueIterator(ctx, oneEnternityLater) // make sure to iterate all queue defer redelegationTimesliceIterator.Close() for ; redelegationTimesliceIterator.Valid(); redelegationTimesliceIterator.Next() { @@ -105,7 +103,7 @@ func containsDVVTriplets(s []stakingtypes.DVVTriplet, e stakingtypes.DVVTriplet) } func removeDuplicateUnbondingValidator(app *RealioNetwork, ctx sdk.Context) { - valIter := app.StakingKeeper.ValidatorQueueIterator(ctx, time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC), 99999999999999) + valIter := app.StakingKeeper.ValidatorQueueIterator(ctx, oneEnternityLater, 99999999999999) defer valIter.Close() for ; valIter.Valid(); valIter.Next() { @@ -133,11 +131,7 @@ func removeDuplicateValueUnbondingQueueKey(app *RealioNetwork, ctx sdk.Context) cdc := app.AppCodec() store := ctx.KVStore(app.keys[stakingtypes.ModuleName]) - // remove duplicate UnbondingQueueKey - ubdTime := sk.UnbondingTime(ctx) - currTime := ctx.BlockTime() - - unbondingTimesliceIterator := sk.UBDQueueIterator(ctx, currTime.Add(ubdTime)) // make sure to iterate all queue + unbondingTimesliceIterator := sk.UBDQueueIterator(ctx, oneEnternityLater) // make sure to iterate all queue defer unbondingTimesliceIterator.Close() for ; unbondingTimesliceIterator.Valid(); unbondingTimesliceIterator.Next() { @@ -159,6 +153,7 @@ func removeDuplicatesDVPairs(dvPairs []stakingtypes.DVPair) []stakingtypes.DVPai list = append(list, item) } } + fmt.Println(list, "remove dv dup") return list } From 652fdc2a527f8da4e1ff8a634d88187eaa85f2f0 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 20:44:45 +0700 Subject: [PATCH 2/8] update fork logic --- app/fork_test.go | 10 +++++----- app/forks.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/fork_test.go b/app/fork_test.go index f28c3c49..8a641c96 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -16,7 +16,7 @@ import ( func TestFork(t *testing.T) { realio := Setup(false, nil) - ctx := realio.BaseApp.NewContext(false, tmproto.Header{Height: int64(ForkHeight)}) + ctx := realio.BaseApp.NewContext(false, tmproto.Header{Height: ForkHeight}) stakingKeeper := realio.StakingKeeper timeKey := time.Date(2024, 4, 1, 1, 1, 1, 1, time.UTC) @@ -25,7 +25,7 @@ func TestFork(t *testing.T) { DelegatorAddress: "test_del_1", ValidatorAddress: "test_val_1", Entries: []stakingtypes.UnbondingDelegationEntry{ - stakingtypes.NewUnbondingDelegationEntry(int64(ForkHeight), timeKey, math.OneInt()), + stakingtypes.NewUnbondingDelegationEntry(ForkHeight, timeKey, math.OneInt()), }, } @@ -37,7 +37,7 @@ func TestFork(t *testing.T) { ValidatorSrcAddress: "test_val_1", ValidatorDstAddress: "test_val_2", Entries: []stakingtypes.RedelegationEntry{ - stakingtypes.NewRedelegationEntry(int64(ForkHeight), timeKey, math.OneInt(), sdk.OneDec()), + stakingtypes.NewRedelegationEntry(ForkHeight, timeKey, math.OneInt(), sdk.OneDec()), }, } stakingKeeper.InsertRedelegationQueue(ctx, duplicativeRedelegation, timeKey) @@ -46,7 +46,7 @@ func TestFork(t *testing.T) { duplicativeVal := stakingtypes.Validator{ OperatorAddress: "test_op", - UnbondingHeight: int64(ForkHeight), + UnbondingHeight: ForkHeight, UnbondingTime: timeKey, } @@ -72,7 +72,7 @@ func TestFork(t *testing.T) { require.Equal(t, triplets[0].ValidatorDstAddress, duplicativeRedelegation.ValidatorDstAddress) require.Equal(t, triplets[0].ValidatorSrcAddress, duplicativeRedelegation.ValidatorSrcAddress) - vals := stakingKeeper.GetUnbondingValidators(ctx, timeKey, int64(ForkHeight)) + vals := stakingKeeper.GetUnbondingValidators(ctx, timeKey, ForkHeight) require.Equal(t, vals[0], duplicativeVal.OperatorAddress) } diff --git a/app/forks.go b/app/forks.go index e72d6ded..c5f2b2a8 100644 --- a/app/forks.go +++ b/app/forks.go @@ -9,7 +9,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ForkHeight = 5989487 +var ForkHeight = int64(5989487) var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) // ScheduleForkUpgrade executes any necessary fork logic for based upon the current @@ -21,7 +21,7 @@ var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) // 1. Release a non-breaking patch version so that the chain can set the scheduled upgrade plan at upgrade-height. // 2. Release the software defined in the upgrade-info func (app *RealioNetwork) ScheduleForkUpgrade(ctx sdk.Context) { - if ctx.BlockHeight() == 5989487 { + if ctx.BlockHeight() == ForkHeight { // remove duplicate UnbondingQueueKey removeDuplicateValueUnbondingQueueKey(app, ctx) From 5a0d0656d1d7bf2b728e7871ebf8ec92b9550cae Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 20:45:34 +0700 Subject: [PATCH 3/8] remove debug log --- app/fork_test.go | 2 -- app/forks.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/fork_test.go b/app/fork_test.go index 8a641c96..bd2c0bb2 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -1,7 +1,6 @@ package app import ( - "fmt" "testing" "time" @@ -97,7 +96,6 @@ func checkDuplicateUBD(eles []stakingtypes.DVPair) bool { for _, ele := range eles { unique_eles[ele.String()] = true } - fmt.Println(eles, "eles") return len(unique_eles) != len(eles) } diff --git a/app/forks.go b/app/forks.go index c5f2b2a8..eb4051d9 100644 --- a/app/forks.go +++ b/app/forks.go @@ -1,7 +1,6 @@ package app import ( - "fmt" "sort" "time" @@ -153,7 +152,6 @@ func removeDuplicatesDVPairs(dvPairs []stakingtypes.DVPair) []stakingtypes.DVPai list = append(list, item) } } - fmt.Println(list, "remove dv dup") return list } From edb486644f870250db12b8f28283796d299069ab Mon Sep 17 00:00:00 2001 From: Master Pi Date: Tue, 2 Apr 2024 14:28:47 +0000 Subject: [PATCH 4/8] lint --- Makefile | 21 ++++++++++++++++++++- app/fork_test.go | 32 ++++++++++++++++---------------- app/forks.go | 17 +++++++++-------- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 88aaca5f..f05136a0 100644 --- a/Makefile +++ b/Makefile @@ -330,4 +330,23 @@ proto-update-deps: @curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto @curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto -.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking proto-update-deps \ No newline at end of file +.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking proto-update-deps + +############################################################################### +### Linting ### +############################################################################### + +golangci_lint_cmd=golangci-lint +golangci_version=v1.52.2 + +lint: + @echo "--> Running linter" + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --timeout=10m + +lint-fix: + @echo "--> Running linter" + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --fix --out-format=tab --issues-exit-code=0 + +.PHONY: lint lint-fix \ No newline at end of file diff --git a/app/fork_test.go b/app/fork_test.go index bd2c0bb2..82def46a 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -73,7 +73,6 @@ func TestFork(t *testing.T) { vals := stakingKeeper.GetUnbondingValidators(ctx, timeKey, ForkHeight) require.Equal(t, vals[0], duplicativeVal.OperatorAddress) - } func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -91,13 +90,13 @@ func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool { return false } -func checkDuplicateUBD(eles []stakingtypes.DVPair) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele.String()] = true +func checkDuplicateUBD(eels []stakingtypes.DVPair) bool { + uniqueEels := map[string]bool{} + for _, ele := range eels { + uniqueEels[ele.String()] = true } - return len(unique_eles) != len(eles) + return len(uniqueEels) != len(eels) } func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -115,13 +114,13 @@ func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { return false } -func checkDuplicateRedelegation(eles []stakingtypes.DVVTriplet) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele.String()] = true +func checkDuplicateRedelegation(eels []stakingtypes.DVVTriplet) bool { + uniqueEels := map[string]bool{} + for _, ele := range eels { + uniqueEels[ele.String()] = true } - return len(unique_eles) != len(eles) + return len(uniqueEels) != len(eels) } func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -138,11 +137,12 @@ func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { } return false } -func checkDuplicateValAddr(eles []string) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele] = true + +func checkDuplicateValAddr(eels []string) bool { + uniqueEels := map[string]bool{} + for _, ele := range eels { + uniqueEels[ele] = true } - return len(unique_eles) != len(eles) + return len(uniqueEels) != len(eels) } diff --git a/app/forks.go b/app/forks.go index eb4051d9..ef855dd0 100644 --- a/app/forks.go +++ b/app/forks.go @@ -8,8 +8,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ForkHeight = int64(5989487) -var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +var ( + ForkHeight = int64(5989487) + oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +) // ScheduleForkUpgrade executes any necessary fork logic for based upon the current // block height and chain ID (mainnet or testnet). It sets an upgrade plan once @@ -77,7 +79,6 @@ func removeDuplicateValueRedelegationQueueKey(app *RealioNetwork, ctx sdk.Contex store.Set(redelegationTimesliceIterator.Key(), bz) } - } func removeDuplicateDVVTriplets(triplets []stakingtypes.DVVTriplet) []stakingtypes.DVVTriplet { @@ -114,13 +115,13 @@ func removeDuplicateUnbondingValidator(app *RealioNetwork, ctx sdk.Context) { vals[valAddr] = true } - unique_addrs := []string{} - for valAddr, _ := range vals { - unique_addrs = append(unique_addrs, valAddr) + uniqueAddrs := []string{} + for valAddr := range vals { + uniqueAddrs = append(uniqueAddrs, valAddr) } - sort.Strings(unique_addrs) + sort.Strings(uniqueAddrs) - ctx.KVStore(app.GetKey(stakingtypes.StoreKey)).Set(valIter.Key(), app.appCodec.MustMarshal(&stakingtypes.ValAddresses{Addresses: unique_addrs})) + ctx.KVStore(app.GetKey(stakingtypes.StoreKey)).Set(valIter.Key(), app.appCodec.MustMarshal(&stakingtypes.ValAddresses{Addresses: uniqueAddrs})) } } From ef7d0a3e38a5a502e4d7cefe609b8d97b23810ae Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 21:29:07 +0700 Subject: [PATCH 5/8] lint --- app/fork_test.go | 32 +++++++++++------------ app/forks.go | 9 ++++--- x/asset/keeper/msg_server_create_token.go | 1 - 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/fork_test.go b/app/fork_test.go index bd2c0bb2..80ee371d 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -73,7 +73,6 @@ func TestFork(t *testing.T) { vals := stakingKeeper.GetUnbondingValidators(ctx, timeKey, ForkHeight) require.Equal(t, vals[0], duplicativeVal.OperatorAddress) - } func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -91,13 +90,13 @@ func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool { return false } -func checkDuplicateUBD(eles []stakingtypes.DVPair) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele.String()] = true +func checkDuplicateUBD(eels []stakingtypes.DVPair) bool { + unique_eels := map[string]bool{} + for _, ele := range eels { + unique_eels[ele.String()] = true } - return len(unique_eles) != len(eles) + return len(unique_eels) != len(eels) } func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -115,13 +114,13 @@ func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { return false } -func checkDuplicateRedelegation(eles []stakingtypes.DVVTriplet) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele.String()] = true +func checkDuplicateRedelegation(eels []stakingtypes.DVVTriplet) bool { + unique_eels := map[string]bool{} + for _, ele := range eels { + unique_eels[ele.String()] = true } - return len(unique_eles) != len(eles) + return len(unique_eels) != len(eels) } func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -138,11 +137,12 @@ func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { } return false } -func checkDuplicateValAddr(eles []string) bool { - unique_eles := map[string]bool{} - for _, ele := range eles { - unique_eles[ele] = true + +func checkDuplicateValAddr(eels []string) bool { + unique_eels := map[string]bool{} + for _, ele := range eels { + unique_eels[ele] = true } - return len(unique_eles) != len(eles) + return len(unique_eels) != len(eels) } diff --git a/app/forks.go b/app/forks.go index eb4051d9..4f4640b1 100644 --- a/app/forks.go +++ b/app/forks.go @@ -8,8 +8,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ForkHeight = int64(5989487) -var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +var ( + ForkHeight = int64(5989487) + oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +) // ScheduleForkUpgrade executes any necessary fork logic for based upon the current // block height and chain ID (mainnet or testnet). It sets an upgrade plan once @@ -77,7 +79,6 @@ func removeDuplicateValueRedelegationQueueKey(app *RealioNetwork, ctx sdk.Contex store.Set(redelegationTimesliceIterator.Key(), bz) } - } func removeDuplicateDVVTriplets(triplets []stakingtypes.DVVTriplet) []stakingtypes.DVVTriplet { @@ -115,7 +116,7 @@ func removeDuplicateUnbondingValidator(app *RealioNetwork, ctx sdk.Context) { } unique_addrs := []string{} - for valAddr, _ := range vals { + for valAddr := range vals { unique_addrs = append(unique_addrs, valAddr) } sort.Strings(unique_addrs) diff --git a/x/asset/keeper/msg_server_create_token.go b/x/asset/keeper/msg_server_create_token.go index ae24c8d1..90f2290e 100644 --- a/x/asset/keeper/msg_server_create_token.go +++ b/x/asset/keeper/msg_server_create_token.go @@ -59,7 +59,6 @@ func (k msgServer) CreateToken(goCtx context.Context, msg *types.MsgCreateToken) coin := sdk.Coins{{Denom: baseDenom, Amount: canonicalAmount}} err = k.bankKeeper.MintCoins(ctx, types.ModuleName, coin) - if err != nil { panic(err) } From df599ebc3d6f1b7d1b4729c0358be64807ebf164 Mon Sep 17 00:00:00 2001 From: Master Pi Date: Tue, 2 Apr 2024 14:29:44 +0000 Subject: [PATCH 6/8] remove lint in Makefile --- Makefile | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Makefile b/Makefile index f05136a0..88aaca5f 100644 --- a/Makefile +++ b/Makefile @@ -330,23 +330,4 @@ proto-update-deps: @curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto @curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto -.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking proto-update-deps - -############################################################################### -### Linting ### -############################################################################### - -golangci_lint_cmd=golangci-lint -golangci_version=v1.52.2 - -lint: - @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=10m - -lint-fix: - @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --fix --out-format=tab --issues-exit-code=0 - -.PHONY: lint lint-fix \ No newline at end of file +.PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking proto-update-deps \ No newline at end of file From a080b31d51bbb422f94eb98044f8de14a715cdc3 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 21:31:53 +0700 Subject: [PATCH 7/8] lint --- app/fork_test.go | 18 +++++++++--------- app/forks.go | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/fork_test.go b/app/fork_test.go index 80ee371d..7ea76277 100644 --- a/app/fork_test.go +++ b/app/fork_test.go @@ -91,12 +91,12 @@ func checkDuplicateUBDQueue(ctx sdk.Context, realio RealioNetwork) bool { } func checkDuplicateUBD(eels []stakingtypes.DVPair) bool { - unique_eels := map[string]bool{} + uniqueEles := map[string]bool{} for _, ele := range eels { - unique_eels[ele.String()] = true + uniqueEles[ele.String()] = true } - return len(unique_eels) != len(eels) + return len(uniqueEles) != len(eels) } func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -115,12 +115,12 @@ func checkDuplicateRelegationQueue(ctx sdk.Context, realio RealioNetwork) bool { } func checkDuplicateRedelegation(eels []stakingtypes.DVVTriplet) bool { - unique_eels := map[string]bool{} + uniqueEles := map[string]bool{} for _, ele := range eels { - unique_eels[ele.String()] = true + uniqueEles[ele.String()] = true } - return len(unique_eels) != len(eels) + return len(uniqueEles) != len(eels) } func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { @@ -139,10 +139,10 @@ func checkDuplicateValQueue(ctx sdk.Context, realio RealioNetwork) bool { } func checkDuplicateValAddr(eels []string) bool { - unique_eels := map[string]bool{} + uniqueEles := map[string]bool{} for _, ele := range eels { - unique_eels[ele] = true + uniqueEles[ele] = true } - return len(unique_eels) != len(eels) + return len(uniqueEles) != len(eels) } diff --git a/app/forks.go b/app/forks.go index 4f4640b1..ef855dd0 100644 --- a/app/forks.go +++ b/app/forks.go @@ -115,13 +115,13 @@ func removeDuplicateUnbondingValidator(app *RealioNetwork, ctx sdk.Context) { vals[valAddr] = true } - unique_addrs := []string{} + uniqueAddrs := []string{} for valAddr := range vals { - unique_addrs = append(unique_addrs, valAddr) + uniqueAddrs = append(uniqueAddrs, valAddr) } - sort.Strings(unique_addrs) + sort.Strings(uniqueAddrs) - ctx.KVStore(app.GetKey(stakingtypes.StoreKey)).Set(valIter.Key(), app.appCodec.MustMarshal(&stakingtypes.ValAddresses{Addresses: unique_addrs})) + ctx.KVStore(app.GetKey(stakingtypes.StoreKey)).Set(valIter.Key(), app.appCodec.MustMarshal(&stakingtypes.ValAddresses{Addresses: uniqueAddrs})) } } From 1638a9f5980b949696171ee594831283a99f764d Mon Sep 17 00:00:00 2001 From: Dzung Do Date: Tue, 2 Apr 2024 21:38:20 +0700 Subject: [PATCH 8/8] Fix lint error --- app/forks.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/forks.go b/app/forks.go index 172315dd..ef855dd0 100644 --- a/app/forks.go +++ b/app/forks.go @@ -8,8 +8,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ForkHeight = int64(5989487) -var oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +var ( + ForkHeight = int64(5989487) + oneEnternityLater = time.Date(9999, 9, 9, 9, 9, 9, 9, time.UTC) +) // ScheduleForkUpgrade executes any necessary fork logic for based upon the current // block height and chain ID (mainnet or testnet). It sets an upgrade plan once