From 93de1d251591514fda03c543a0430c5a1677d1c3 Mon Sep 17 00:00:00 2001 From: Yaru Wang Date: Fri, 21 Jul 2023 18:47:21 +0200 Subject: [PATCH] refactor --- x/ccv/provider/keeper/keeper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 1106c48ed1..3d81ff0cf3 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -765,7 +765,7 @@ func (k Keeper) ConsumeSlashAcks(ctx sdk.Context, chainID string) (acks []types. return } - acks, err := StrToConsumerConsAddress(addresses) + acks, err := StrToConsumerConsAddresses(addresses) if err != nil { // todo } @@ -787,7 +787,7 @@ func (k Keeper) AppendSlashAck(ctx sdk.Context, chainID string, ack types.ConsumerConsAddress, ) { acks := k.GetSlashAcks(ctx, chainID) - consAddresses, err := StrToConsumerConsAddress(acks) + consAddresses, err := StrToConsumerConsAddresses(acks) if err != nil { // todo } @@ -1077,7 +1077,7 @@ func (k Keeper) BondDenom(ctx sdk.Context) string { } // helper func -func StrToConsumerConsAddress(addresses []string) ([]types.ConsumerConsAddress, error) { +func StrToConsumerConsAddresses(addresses []string) ([]types.ConsumerConsAddress, error) { consAddresses := []types.ConsumerConsAddress{} for _, address := range addresses { // reverse of ConsumerConsAddress.String()