Disconnect peer when force closing a funded channel with an error
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Fri, 13 Oct 2023 16:28:35 +0000 (09:28 -0700)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Wed, 18 Oct 2023 18:25:27 +0000 (11:25 -0700)
commit94e0ecec68d85ca1e10d08d6b35a9c9284c25ebb
treeae36fbb2f4da4cb919d0248e3722914558875a26
parent9f7de472fb5e5371f8d697941b6ab443fadb220f
Disconnect peer when force closing a funded channel with an error

We do this to ensure that the counterparty will always broadcast their
latest state when we broadcast ours. Usually, they'll do this with the
`error` message alone, but if they don't receive it or ignore it, then
we'll force them to broadcast by sending them a bogus
`channel_reestablish` upon reconnecting. Note that this doesn't apply to
unfunded channels as there is no commitment transaction to broadcast.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/reload_tests.rs