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

Function half_chan_idx

gossipd/routing.h:187–193  ·  view source on GitHub ↗

If you know n is one end of the channel, get index of src == n */

Source from the content-addressed store, hash-verified

185
186/* If you know n is one end of the channel, get index of src == n */
187static inline int half_chan_idx(const struct node *n, const struct chan *chan)
188{
189 int idx = (chan->nodes[1] == n);
190
191 assert(chan->nodes[0] == n || chan->nodes[1] == n);
192 return idx;
193}
194
195struct routing_state {
196 /* TImers base from struct gossipd. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected