fn to_seed_peer<T: Fn(&ValidatorInfo) -> Result<Vec<NetworkAddress>, bcs::Error>>(
    validator_info: &ValidatorInfo,
    to_addresses: &T,
) -> Result<(PeerId, TrustedPeer), bcs::Error> {
    let peer_id = *validator_info.account_address();
    let addrs = to_addresses(validator_info)?;
    Ok((peer_id, TrustedPeer::from(addrs)))
}
/// Convert ValidatorInfo to a seed peer
Convert ValidatorInfo to a seed peer
Convert ValidatorInfo to a seed peer
fn to_seed_peer<T: Fn(&ValidatorInfo) -> Result<Vec<NetworkAddress>, bcs::Error>>(
    validator_info: &ValidatorInfo,
    to_addresses: &T,
) -> Result<(PeerId, TrustedPeer), bcs::Error> {
    let peer_id = *validator_info.account_address();
    let addrs = to_addresses(validator_info)?;
    Ok((peer_id, TrustedPeer::from(addrs)))
}
fn to_seed_peer < T : Fn ( & ValidatorInfo ) -> Result < Vec < NetworkAddress > , bcs :: Error > > ( validator_info : & ValidatorInfo , to_addresses : & T , ) -> Result < ( PeerId , TrustedPeer ) , bcs :: Error > { let peer_id = * validator_info . account_address ( ) ; let addrs = to_addresses ( validator_info ) ? ; Ok ( ( peer_id , TrustedPeer :: from ( addrs ) ) ) }
Convert ValidatorInfo to a seed peer
Convert ValidatorInfo to a seed peer
validator_info
&ValidatorInfo
to_addresses
&T