Skip to content

Commit

Permalink
improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Sep 4, 2024
1 parent e41f7fd commit ef5ca2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/ccv/provider/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ func (k Keeper) DeleteConsumerIdToChannelId(ctx sdk.Context, consumerId string)
store.Delete(types.ConsumerIdToChannelIdKey(consumerId))
}

// GetAllConsumersWithIBCClients returns all ids of consumer chains that with IBC clients created.
// GetAllConsumersWithIBCClients returns the ids of all consumer chains that with IBC clients created.
// This is equivalent to getting the ids of all launched consumer chains:
// All launched chains have created an IBC client when they launched (see `LaunchConsumer`).
func (k Keeper) GetAllConsumersWithIBCClients(ctx sdk.Context) []string {
consumerIds := []string{}

// All launched chains have created an IBC client when they launched (see `LaunchConsumer`), so we traverse over
// `ConsumerIdToClientIdKeyPrefix` to retrieve the launched chains.
store := ctx.KVStore(k.storeKey)
iterator := storetypes.KVStorePrefixIterator(store, types.ConsumerIdToClientIdKeyPrefix())
defer iterator.Close()
Expand Down

0 comments on commit ef5ca2b

Please sign in to comment.