From a080b31d51bbb422f94eb98044f8de14a715cdc3 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 2 Apr 2024 21:31:53 +0700 Subject: [PATCH] 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})) } }