/// The function converts a `GossipConfig` to a `ChannelConfig`.
The function converts a `GossipConfig` to a `ChannelConfig`.
The function converts a ` GossipConfig ` to a ` ChannelConfig ` .
fn from(gossip_config: GossipConfig) -> Self {
        let max_outstanding_buffer = gossip_config
            .max_artifact_streams_per_peer
            .try_into()
            .unwrap();
        Self {
            map: FlowType::iter()
                .map(|flow_type| match flow_type {
                    FlowType::Advert => (flow_type, MAX_ADVERT_BUFFER),
                    FlowType::Request => (flow_type, max_outstanding_buffer),
                    FlowType::Chunk => (flow_type, max_outstanding_buffer),
                    FlowType::Retransmission => (flow_type, MAX_RETRANSMISSION_BUFFER),
                    FlowType::Transport => (flow_type, MAX_TRANSPORT_BUFFER),
                    FlowType::SendAdvert => (flow_type, MAX_ADVERT_BUFFER),
                })
                .collect(),
        }
    }
fn from ( gossip_config : GossipConfig ) -> Self { let max_outstanding_buffer = gossip_config . max_artifact_streams_per_peer . try_into ( ) . unwrap ( ) ; Self { map : FlowType :: iter ( ) . map ( | flow_type | match flow_type { FlowType :: Advert => ( flow_type , MAX_ADVERT_BUFFER ) , FlowType :: Request => ( flow_type , max_outstanding_buffer ) , FlowType :: Chunk => ( flow_type , max_outstanding_buffer ) , FlowType :: Retransmission => ( flow_type , MAX_RETRANSMISSION_BUFFER ) , FlowType :: Transport => ( flow_type , MAX_TRANSPORT_BUFFER ) , FlowType :: SendAdvert => ( flow_type , MAX_ADVERT_BUFFER ) , } ) . collect ( ) , } }
The function converts a `GossipConfig` to a `ChannelConfig`.
The function converts a ` GossipConfig ` to a ` ChannelConfig ` .
gossip_config
GossipConfig