Dont use PaymentPathFailed a probe fails without making it out
authorMatt Corallo <git@bluematt.me>
Wed, 7 Sep 2022 21:39:17 +0000 (21:39 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 8 Sep 2022 18:54:08 +0000 (18:54 +0000)
commite7673971be57cc98f1d8005ec54cb22ea59cd7f3
tree86bab6d441a4423f1fc68c56c121e695d5340b21
parentfd328e71dac9bcd64895bea5a1805191387f8241
Dont use PaymentPathFailed a probe fails without making it out

When we fail to forward a probe HTLC at all and immediately fail it
(e.g. due to the first hop channel closing) we'd previously
spuriously generate only a `PaymentPathFailed` event. This violates
the expected API, as users expect a `ProbeFailed` event instead.

This fixes the oversight by ensuring we generate the correct event.

Thanks to @jkczyz for pointing out this issue.
lightning/src/ln/channelmanager.rs
lightning/src/ln/payment_tests.rs