1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 14:50:46 +01:00
eclair/eclair-core
Bastien Teinturier 8320964c54
Improve htlc_maximum_msat in channel updates (#2299)
* Improve htlc_maximum_msat in channel updates

We previously set the `htlc_maximum_msat` inside `channel_update` to the
channel's capacity, but that didn't make any sense: we will reject htlcs
that are above the local or remote `max_htlc_value_in_flight_msat`.

We now set this value to match the lowest `max_htlc_value_in_flight_msat`
of the channel, and properly type our local value to be a millisatoshi
amount instead of a more generic UInt64.

* Set max-htlc-in-flight based on channel capacity

We introduce a new parameter to set `max-htlc-value-in-flight` based on
the channel capacity, when it provides a lower value than the existing
`max-htlc-value-in-flight-msat` static value.

* Allow disabling max-htlc-value-in-flight-msat

When opening a channel to a mobile wallet user, we may want to set our
`max-htlc-value-in-flight-msat` to something greater than the funding
amount to allow the wallet user to empty their channels using a single
HTLC per channel.
2022-12-13 15:08:35 +01:00
..
src Improve htlc_maximum_msat in channel updates (#2299) 2022-12-13 15:08:35 +01:00
eclair-cli Make eclair-cli -s display short channel ids correctly (#2488) 2022-11-15 15:56:40 +01:00
pom.xml Switch embedded postgres library used in tests (#2518) 2022-12-08 13:19:29 +01:00