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

Function gossmap_chan_has_capacity

common/gossmap.c:1605–1616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1603}
1604
1605bool gossmap_chan_has_capacity(const struct gossmap_chan *chan,
1606 int direction,
1607 struct amount_msat amount)
1608{
1609 if (amount_msat_less_fp16(amount, chan->half[direction].htlc_min))
1610 return false;
1611
1612 if (amount_msat_greater_fp16(amount, chan->half[direction].htlc_max))
1613 return false;
1614
1615 return true;
1616}
1617
1618/* Get the announcement msg which created this chan */
1619u8 *gossmap_chan_get_announce(const tal_t *ctx,

Callers 1

Calls 2

amount_msat_less_fp16Function · 0.85
amount_msat_greater_fp16Function · 0.85

Tested by

no test coverage detected