pub fn broadcast(
        id: &Pubkey,
        contains_last_tick: bool,
        broadcast_table: &[ContactInfo],
        s: &UdpSocket,
        blobs: &[SharedBlob],
    ) -> Result<()> {
        if broadcast_table.is_empty() {
            debug!("{}:not enough peers in cluster_info table", id);
            inc_new_counter_error!("cluster_info-broadcast-not_enough_peers_error", 1);
            Err(ClusterInfoError::NoPeers)?;
        }

        let orders = Self::create_broadcast_orders(contains_last_tick, blobs, broadcast_table);

        trace!("broadcast orders table {}", orders.len());

        let errs = Self::send_orders(id, s, orders);

        for e in errs {
            if let Err(e) = &e {
                trace!("{}: broadcast result {:?}", id, e);
            }
            e?;
        }

        inc_new_counter_debug!("cluster_info-broadcast-max_idx", blobs.len());

        Ok(())
    }
/// broadcast messages from the leader to layer 1 nodes
/// # Remarks
broadcast messages from the leader to layer 1 nodes
broadcast messages from the leader to layer 1 nodes
pub fn broadcast(
        id: &Pubkey,
        contains_last_tick: bool,
        broadcast_table: &[ContactInfo],
        s: &UdpSocket,
        blobs: &[SharedBlob],
    ) -> Result<()> {
        if broadcast_table.is_empty() {
            debug!("{}:not enough peers in cluster_info table", id);
            inc_new_counter_error!("cluster_info-broadcast-not_enough_peers_error", 1);
            Err(ClusterInfoError::NoPeers)?;
        }
        let orders = Self::create_broadcast_orders(contains_last_tick, blobs, broadcast_table);
        trace!("broadcast orders table {}", orders.len());
        let errs = Self::send_orders(id, s, orders);
        for e in errs {
            if let Err(e) = &e {
                trace!("{}: broadcast result {:?}", id, e);
            }
            e?;
        }
        inc_new_counter_debug!("cluster_info-broadcast-max_idx", blobs.len());
        Ok(())
    }
pub fn broadcast ( id : & Pubkey , contains_last_tick : bool , broadcast_table : & [ ContactInfo ] , s : & UdpSocket , blobs : & [ SharedBlob ] , ) -> Result < ( ) > { if broadcast_table . is_empty ( ) { debug ! ( " " id ) ; inc_new_counter_error ! ( " " 1 ) ; Err ( ClusterInfoError :: NoPeers ) ? ; } let orders = Self :: create_broadcast_orders ( contains_last_tick , blobs , broadcast_table ) ; trace ! ( " " orders len ( ) ) ; let errs = Self :: send_orders ( id , s , orders ) ; for e in errs { if let Err ( e ) = & e { trace ! ( " " id e ) ; } e ? ; } inc_new_counter_debug ! ( " " blobs len ( ) ) ; Ok ( ( ) ) }
broadcast messages from the leader to layer 1 nodes
broadcast messages from the leader to layer 1 nodes
id
&Pubkey
contains_last_tick
bool
broadcast_table
&[ContactInfo]
s
&UdpSocket
blobs
&[SharedBlob]
id
&Pubkey
contains_last_tick
bool
broadcast_table
&[ContactInfo]
s
&UdpSocket
blobs
&[SharedBlob]
remarks
None