1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 14:50:46 +01:00
eclair/eclair-core
Pierre-Marie Padiou f454c5e004
Rework channel_update management (#284)
The previous assumption that a `channel_update` only exists when we have a
related `channel_announcement` does not always hold true. There are two
special cases:
- we want the `router` to know of our outgoing `channel_update` as soon as
  a channel reaches `NORMAL` state, so that we can immediately send
  payments
- we need to know remote's `channel_update` even for private (unannounced)
  channels, in order to be able to receive funds (we will put those as
  hints in the payment request using the `r` field); we also need to send
  out our `channel_update` for private channels for the same reason

In order to do that, two fields were added to the `router`'s state:
- `privateChannels`: similar to `channels`, but holds a fake `channel_announcement`s for local channels that are private or are public but not yet announced
- `privateUpdates`: similar to `updates`, but holds `channel_update`s related to local channels that are private, or are public but not yet announced.

For local public channels, we will have `channel_update` both in `updates` and in `privateUpdates`, but the latter has the precedence when computing routes.

Also, in the `channel` we now handle the sending of new `channel_update` during the transitions, as opposed to in the state handlers.

Note that this changes the serialization format, making this upgrade not backward-compatible.

This fixes #244.
2017-12-22 18:28:40 +01:00
..
src Rework channel_update management (#284) 2017-12-22 18:28:40 +01:00
eclair-cli Added more methods in API (#281) 2017-12-15 15:05:22 +01:00
pom.xml back to SNAPSHOT 2017-12-14 18:22:39 +01:00