Add preflight probing capabilities
authorElias Rohrer <dev@tnull.de>
Mon, 28 Aug 2023 13:03:04 +0000 (15:03 +0200)
committerElias Rohrer <dev@tnull.de>
Mon, 18 Sep 2023 13:08:27 +0000 (15:08 +0200)
commit20c842b4969f6de53cba703cfa959153ac10cb80
treee185bffa183d72cad1690a518d419b8088013924
parentc6a1a12acaec7994694bb389aaa183719873ebee
Add preflight probing capabilities

We add a `ChannelManager::send_preflight_probes` method that can be used
to send pre-flight probes given some [`RouteParameters`]. Additionally,
we add convenience methods in for spontaneous probes and send pre-flight
probes for a given invoice.

As pre-flight probes might take up some of the available liquidity, we
here introduce that channels whose available liquidity is less than the
required amount times
`UserConfig::preflight_probing_liquidity_limit_multiplier` won't be used
to send pre-flight probes.

This commit is a more or less a carbon copy of the pre-flight
probing code recently added to LDK Node.
lightning-invoice/src/payment.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/outbound_payment.rs