File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -3629,23 +3629,22 @@ impl<SP: Deref> Channel<SP> where
3629
3629
.map(|fail_msg_opt| fail_msg_opt.map(|_| ())))
3630
3630
}
3631
3631
};
3632
- match fail_htlc_res {
3633
- Some(Ok(fail_msg_opt)) => {
3634
- // If an HTLC failure was previously added to the holding cell (via
3635
- // `queue_fail_{malformed_}htlc`) then generating the fail message itself must
3636
- // not fail - we should never end up in a state where we double-fail
3637
- // an HTLC or fail-then-claim an HTLC as it indicates we didn't wait
3638
- // for a full revocation before failing.
3639
- debug_assert!(fail_msg_opt.is_some());
3640
- update_fail_count += 1 ;
3641
- },
3642
- Some(Err(e)) => {
3643
- if let ChannelError::Ignore(_) = e {}
3644
- else {
3632
+ if let Some(res) = fail_htlc_res {
3633
+ match res {
3634
+ Ok(fail_msg_opt) => {
3635
+ // If an HTLC failure was previously added to the holding cell (via
3636
+ // `queue_fail_{malformed_}htlc`) then generating the fail message itself must
3637
+ // not fail - we should never end up in a state where we double-fail
3638
+ // an HTLC or fail-then-claim an HTLC as it indicates we didn't wait
3639
+ // for a full revocation before failing.
3640
+ debug_assert!(fail_msg_opt.is_some()) ;
3641
+ update_fail_count += 1;
3642
+ },
3643
+ Err( ChannelError::Ignore(_)) => {},
3644
+ Err(_) => {
3645
3645
panic!("Got a non-IgnoreError action trying to fail holding cell HTLC");
3646
- }
3647
- },
3648
- None => {}
3646
+ },
3647
+ }
3649
3648
}
3650
3649
}
3651
3650
if update_add_count == 0 && update_fulfill_count == 0 && update_fail_count == 0 && self.context.holding_cell_update_fee.is_none() {
You can’t perform that action at this time.
0 commit comments