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

Function gossmap_chan_has_capacity

common/gossmap.c:1599–1610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1597}
1598
1599bool gossmap_chan_has_capacity(const struct gossmap_chan *chan,
1600 int direction,
1601 struct amount_msat amount)
1602{
1603 if (amount_msat_less_fp16(amount, chan->half[direction].htlc_min))
1604 return false;
1605
1606 if (amount_msat_greater_fp16(amount, chan->half[direction].htlc_max))
1607 return false;
1608
1609 return true;
1610}
1611
1612/* Get the announcement msg which created this chan */
1613u8 *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