Drop redundant code in `fail_holding_cell_htlcs`
authorMatt Corallo <git@bluematt.me>
Wed, 7 Sep 2022 21:09:50 +0000 (21:09 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 8 Sep 2022 18:54:05 +0000 (18:54 +0000)
commitfd328e71dac9bcd64895bea5a1805191387f8241
tree73b025e2b3d9ed6dadc8d68f671212124a26169d
parent5e65c49a82e901527ca6daafd653c24ee15573e7
Drop redundant code in `fail_holding_cell_htlcs`

`fail_holding_cell_htlcs` calls through to
`fail_htlc_backwards_internal` for HTLCs that need to be
failed-backwards but opts to generate its own payment failure
events for `HTLCSource:;OutboundRoute` HTLCs. There is no reason
for that as `fail_htlc_backwards_internal` will also happily
generate (now-)equivalent events for `HTLCSource::OutboundRoute`
HTLCs.

Thus, we can drop the redundant code and always call
`fail_htlc_backwards_internal` for each HTLC in
`fail_holding_cell_htlcs`.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs