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 41d1fc26a9 Reworked handling of shutdown messages (#176)
Current version attempted to do everything at once, and would always
leave the NORMAL state after processing the `shutdown` message. In
addition to being overly complicated, it had bugs because it is just
not always possible to do so: for example when we have unsigned outgoing
`update_add_htlc` and are already in the process of signing older changes,
the only thing we can do is wait for the counterparty's `revoke_and_ack`
and sign again right away when we receive it. Only after that can we
send our `shutdown` message, and we can't accept new `update_add_htlc`
in the meantime.

Another issue with the current implementation was that we considered
unsigned outgoing *changes*, when only unsigned outgoing `update_add_htlc`
are relevant in the context of `shutdown` logic.

We now also fail to route htlcs in SHUTDOWN state, as recommended by BOLT 2.

This fixes #173.
2017-10-11 17:53:23 +02:00
..
src Reworked handling of shutdown messages (#176) 2017-10-11 17:53:23 +02:00
eclair-cli Bugfixes and minor improvements (#117) 2017-07-26 18:57:31 +02:00
pom.xml back to 0.2-SNAPHOT (#166) 2017-09-20 15:16:49 +02:00