Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
expertdicer committed Apr 2, 2024
1 parent ef7d0a3 commit a080b31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions app/fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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)
}
8 changes: 4 additions & 4 deletions app/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}))
}
}

Expand Down

0 comments on commit a080b31

Please sign in to comment.