// TODO: Consider removing these helper methods and simply using the network_send channel
Consider removing these helper methods and simply using the network_send channel
Consider removing these helper methods and simply using the network_send channel
pub fn gossip(
    mut network_send: mpsc::UnboundedSender<NetworkMessage>,
    topic: String,
    data: Vec<u8>,
    log: slog::Logger,
) {
    network_send
        .send(NetworkMessage::Publish {
            topic: GossipTopic::new(topic),
            message: data,
        })
        .unwrap_or_else(|_| warn!(log, "Could not send gossip message."));
}
pub fn gossip ( mut network_send : mpsc :: UnboundedSender < NetworkMessage > , topic : String , data : Vec < u8 > , log : slog :: Logger , ) { network_send . send ( NetworkMessage :: Publish { topic : GossipTopic :: new ( topic ) , message : data , } ) . unwrap_or_else ( | _ | warn ! ( log " " ) ) ; }
TODO: Consider removing these helper methods and simply using the network_send channel
TODO : Consider removing these helper methods and simply using the network_send channel
network_send
mpsc::UnboundedSender<NetworkMessage>
topic
String
data
Vec<u8>
log
slog::Logger