Include all channel route hints if no connected channels exist 2022-10-disconnected-hints
authorMatt Corallo <git@bluematt.me>
Thu, 13 Oct 2022 21:57:09 +0000 (21:57 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 18 Oct 2022 21:46:13 +0000 (21:46 +0000)
commita534dcc5cde97c423434ba64141e7c03c796c3ee
treeb14e3f4a9cce724aab4e27559a3af563e00eeed2
parentfdfd4f034cee6a1ab56367b66a0396fb88ed7d4a
Include all channel route hints if no connected channels exist

Mobile clients often take a second or two before they reconnect to
their peers as its not always clear immediately that connections
have been killed (especially on iOS). This can cause us to
spuriously fail to include route hints in our invoices if we're on
mobile.

The fix is simple, if we're selecting channels to include in route
hints and we're not not connected to the peer for any of our
channels, we should simply include the hints for all channels, even
though we're disconencted.

Fixes #1768.
lightning-invoice/src/utils.rs