Close duplicate channels
Due to the way the channel initialization protocol is designed, it is possible to have multiple channels passing the ACK step on the consumer (i.e., move to OPEN on consumer). However, only one channel (the CCV channel) will pass the CONFIRM step (i.e., move to OPEN on provider). For cleaning up the state, the other channels that are opened on the consumer, but do not become the CCV channel, should be closed.
Suggestion: Iterate over all channels on port ConsumerPortId when receiving the first VSC packet. See https://github.com/cosmos/ibc-go/blob/42240b54f23ae1d2f8f170f942e49e54ebb7588a/modules/core/04-channel/keeper/keeper.go#L370 for example of how to iterate over all channels.
I'm usually not that into garbage collecting state that people paid gas to add, but I wouldn't reject this. Certainly not a high priority IMO
This issue is more about dealing with particular state that will be difficult to clean due to the way the IS protocol is design, i.e., a channel that is open on one end and cannot open on the other end. I agree that is low priority ;)
Closing to reduce clutter. My rule of thumb is that if there is state that
- a user has paid to add and
- is not iterated on endblock
We shouldn't worry about cleaning it up.