pub fn is_picked_peer(&self, peer: PeerNetworkId) -> bool {
        if self.is_primary_upstream_peer(peer) {
            return true;
        }

        let no_live_primaries = self
            .peer_info
            .lock()
            .expect("failed to acquire peer info lock")
            .iter()
            .find(|(peer, state)| self.is_primary_upstream_peer(**peer) && state.is_alive)
            .is_none();

        // for fallback peers, broadcast if k-policy is on
        // TODO change from sending to k fallback peers instead of sending to all fallback peers
        no_live_primaries && self.min_broadcast_recipient_count > 0
    }
// checks whether a peer is a chosen broadcast recipient:
// - all primary peers
// - fallback peers, if k-policy is enabled
// this does NOT check for whether this peer is alive
checks whether a peer is a chosen broadcast recipient:
all primary peers
fallback peers, if k-policy is enabled
this does NOT check for whether this peer is alive
checks whether a peer is a chosen broadcast recipient : all primary peers fallback peers if k - policy is enabled this does NOT check for whether this peer is alive
pub fn is_picked_peer(&self, peer: PeerNetworkId) -> bool {
        if self.is_primary_upstream_peer(peer) {
            return true;
        }
        let no_live_primaries = self
            .peer_info
            .lock()
            .expect("failed to acquire peer info lock")
            .iter()
            .find(|(peer, state)| self.is_primary_upstream_peer(**peer) && state.is_alive)
            .is_none();
        // for fallback peers, broadcast if k-policy is on
        // TODO change from sending to k fallback peers instead of sending to all fallback peers
        no_live_primaries && self.min_broadcast_recipient_count > 0
    }
pub fn is_picked_peer ( & self , peer : PeerNetworkId ) -> bool { if self . is_primary_upstream_peer ( peer ) { return true ; } let no_live_primaries = self . peer_info . lock ( ) . expect ( " " ) . iter ( ) . find ( | ( peer , state ) | self . is_primary_upstream_peer ( * * peer ) && state . is_alive ) . is_none ( ) ; // for fallback peers, broadcast if k-policy is on // TODO change from sending to k fallback peers instead of sending to all fallback peers no_live_primaries && self . min_broadcast_recipient_count > 0 }
checks whether a peer is a chosen broadcast recipient:
 all primary peers
 fallback peers, if k-policy is enabled
this does NOT check for whether this peer is alive
checks whether a peer is a chosen broadcast recipient : all primary peers fallback peers if k - policy is enabled this does NOT check for whether this peer is alive
&self
peer
PeerNetworkId
&self
peer
PeerNetworkId