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

Function local_direction

gossipd/routing.h:249–261  ·  view source on GitHub ↗

Which direction are we? False if neither. */

Source from the content-addressed store, hash-verified

247
248/* Which direction are we? False if neither. */
249static inline bool local_direction(struct routing_state *rstate,
250 const struct chan *chan,
251 int *direction)
252{
253 for (int dir = 0; dir <= 1; (dir)++) {
254 if (node_id_eq(&chan->nodes[dir]->id, &rstate->local_id)) {
255 if (direction)
256 *direction = dir;
257 return true;
258 }
259 }
260 return false;
261}
262
263static inline struct chan *
264get_channel(const struct routing_state *rstate,

Callers 8

peer_disable_channelsFunction · 0.85
peer_enable_channelsFunction · 0.85
gossip_refresh_networkFunction · 0.85
routing_channel_spentFunction · 0.85

Calls 1

node_id_eqFunction · 0.85

Tested by

no test coverage detected