MCPcopy Create free account
hub / github.com/ElementsProject/lightning / handle_gossip_in

Function handle_gossip_in

connectd/multiplex.c:829–842  ·  view source on GitHub ↗

Forward to gossipd */

Source from the content-addressed store, hash-verified

827
828/* Forward to gossipd */
829static void handle_gossip_in(struct peer *peer, const u8 *msg)
830{
831 u8 *gmsg;
832
833 /* We warn at 250000, drop at 500000 */
834 if (daemon_conn_queue_length(peer->daemon->gossipd) > 500000)
835 return;
836
837 gmsg = towire_gossipd_recv_gossip(NULL, &peer->id, msg);
838
839 /* gossipd doesn't log IO, so we log it here. */
840 log_peer_io(peer, msg);
841 daemon_conn_send(peer->daemon->gossipd, take(gmsg));
842}
843
844static void handle_gossip_timestamp_filter_in(struct peer *peer, const u8 *msg)
845{

Callers 1

handle_message_locallyFunction · 0.85

Calls 3

daemon_conn_queue_lengthFunction · 0.85
log_peer_ioFunction · 0.85
daemon_conn_sendFunction · 0.85

Tested by

no test coverage detected