| 463 | } |
| 464 | |
| 465 | static 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 |
no test coverage detected