Function ibc::core::connection::types::version::pick_version

source ยท
pub fn pick_version(
    supported_versions: &[Version],
    counterparty_versions: &[Version]
) -> Result<Version, ConnectionError>
Expand description

Iterates over the descending ordered set of compatible IBC versions and selects the first version with a version identifier that is supported by the counterparty. The returned version contains a feature set with the intersection of the features supported by the source and counterparty chains. If the feature set intersection is nil then the search for a compatible version continues. This function is called in the conn_open_try handshake procedure.

NOTE: Empty feature set is not currently allowed for a chosen version.