Correct `expect_payment_forwarded` upstream channel checking
authorMatt Corallo <git@bluematt.me>
Sun, 27 Aug 2023 20:37:36 +0000 (20:37 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 12 Sep 2023 19:03:17 +0000 (19:03 +0000)
commit46453bf07862ae91de3681846a165fc71b38f42e
tree6a520762f12d1fb2f12a484f746797b58d7f64fc
parent5ff51b7805969bcd867572bc8102e0efb827765d
Correct `expect_payment_forwarded` upstream channel checking

`expect_payment_forwarded` takes a bool to indicate that the
inbound channel on which we received a forwarded payment has been
closed, but then ignores it in favor of looking at the fee in the
event. While this is generally correct, in cases where we process
an event after a channel was closed, which was generated before a
channel closed this is incorrect.

Instead, we examine the bool we already passed and use that.
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/payment_tests.rs