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

Function selected_peer

gossipd/seeker.c:113–124  ·  view source on GitHub ↗

Set this peer as our random peer; return false if NULL. */

Source from the content-addressed store, hash-verified

111
112/* Set this peer as our random peer; return false if NULL. */
113static bool selected_peer(struct seeker *seeker, struct peer *peer)
114{
115 if (!peer)
116 return false;
117
118 seeker->random_peer = peer;
119
120 /* Give it some grace in case we immediately hit timer */
121 seeker->prev_gossip_count
122 = peer->query_reply_counter - GOSSIP_SEEKER_INTERVAL(seeker);
123 return true;
124}
125
126#define set_state(seeker, state, peer, ...) \
127 set_state_((seeker), (state), (peer), stringify(state), __VA_ARGS__)

Callers 3

set_state_Function · 0.85
peer_gossip_startupFunction · 0.85
process_scid_probeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected