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

Function route_can_carry_even_disabled

common/route.c:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <common/route.h>
6
7bool route_can_carry_even_disabled(const struct gossmap *map,
8 const struct gossmap_chan *c,
9 int dir,
10 struct amount_msat amount,
11 void *unused)
12{
13 if (!gossmap_chan_set(c, dir))
14 return false;
15 /* Amount 0 is a special "ignore min" probe case */
16 if (!amount_msat_is_zero(amount)
17 && !gossmap_chan_has_capacity(c, dir, amount))
18 return false;
19 return true;
20}
21
22/* Generally only one side gets marked disabled, but it's disabled. */
23bool route_can_carry(const struct gossmap *map,

Calls 3

gossmap_chan_setFunction · 0.85
amount_msat_is_zeroFunction · 0.85

Tested by 2