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

Function payment_chanhints_get

plugins/libplugin-pay.c:465–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465static struct channel_hint *payment_chanhints_get(struct payment *p,
466 struct route_hop *h)
467{
468 struct payment *root = payment_root(p);
469 struct channel_hint *curhint;
470 for (size_t j = 0; j < tal_count(root->channel_hints); j++) {
471 curhint = &root->channel_hints[j];
472 if (short_channel_id_eq(&curhint->scid.scid, &h->scid) &&
473 curhint->scid.dir == h->direction) {
474 return curhint;
475 }
476 }
477 return NULL;
478}
479
480/* Given a route and a couple of channel hints, apply the route to the channel
481 * hints, so we have a better estimation of channel's capacity. We apply a

Callers 1

Calls 1

payment_rootFunction · 0.85

Tested by

no test coverage detected