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

Function set_preferred_peer

gossipd/seeker.c:148–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148static void set_preferred_peer(struct seeker *seeker, struct peer *peer)
149{
150 if (seeker->preferred_peer_softref
151 && seeker->preferred_peer_softref != peer) {
152 clear_softref(seeker, &seeker->preferred_peer_softref);
153 set_softref(seeker, &seeker->preferred_peer_softref, peer);
154 }
155}
156
157/* Get a random peer, but try our preferred peer first, if any. This
158 * biasses us to the peer that told us of unexpected gossip. */

Callers 4

nodeannounce_query_doneFunction · 0.85
check_timestampsFunction · 0.85
add_unknown_scidFunction · 0.85
query_unknown_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected