From ef5ca2b0fe7cc4428f5268c76d9e5bc58a8f5b24 Mon Sep 17 00:00:00 2001 From: mpoke Date: Wed, 4 Sep 2024 11:46:04 +0200 Subject: [PATCH] improve comment --- 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 04f4ca9051..ee25626169 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -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()