Once issue #3957 is addressed, the remaining usages of GetConsensusState do not involve doing anything with the returned consensus state (i.e. it's only used to determine if the consensus state exists in store or not), so the function could just be turned into HasConsensusState to reduce gas consumption. It might also be possible to make the function unexported.
Surfaced from Interchain IBC team's review of 08-wasm at hash https://github.com/strangelove-ventures/ibc-go/commit/96e9930ab87a171a3ae6ac9717ee25bfda77212b
Pre-requisite:
Once issue #3957 is addressed, the remaining usages of
GetConsensusState
do not involve doing anything with the returned consensus state (i.e. it's only used to determine if the consensus state exists in store or not), so the function could just be turned intoHasConsensusState
to reduce gas consumption. It might also be possible to make the function unexported.