Skip to content

Commit

Permalink
add client ID to consumer list query
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Oct 5, 2022
1 parent 180d210 commit ca7ce53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/ccv/provider/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
"context"
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
Expand Down Expand Up @@ -39,7 +40,7 @@ func (k Keeper) QueryConsumerChains(goCtx context.Context, req *types.QueryConsu
ctx := sdk.UnwrapSDKContext(goCtx)
chains := []string{}
cb := func(ctx sdk.Context, chainID, clientID string) bool {
chains = append(chains, chainID)
chains = append(chains, fmt.Sprintf("%s (%s)", chainID, clientID))
return false
}
k.IterateConsumerChains(ctx, cb)
Expand Down

0 comments on commit ca7ce53

Please sign in to comment.