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

Function find_peer

gossipd/gossipd.c:96–104  ·  view source on GitHub ↗

Search for a peer. */

Source from the content-addressed store, hash-verified

94
95/* Search for a peer. */
96struct peer *find_peer(struct daemon *daemon, const struct node_id *id)
97{
98 struct peer *peer;
99
100 list_for_each(&daemon->peers, peer, list)
101 if (node_id_eq(&peer->id, id))
102 return peer;
103 return NULL;
104}
105
106/* Increase a peer's gossip_counter, if peer not NULL */
107void peer_supplied_good_gossip(struct peer *peer, size_t amount)

Callers 5

connectd_new_peerFunction · 0.70
connectd_peer_goneFunction · 0.70
handle_recv_gossipFunction · 0.70
apply_updateFunction · 0.70

Calls 1

node_id_eqFunction · 0.85

Tested by

no test coverage detected