We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a66e597 commit 4f77c81Copy full SHA for 4f77c81
src/ln/channel.rs
@@ -1018,10 +1018,13 @@ impl Channel {
1018
for (idx, htlc) in self.pending_htlcs.iter().enumerate() {
1019
if !htlc.outbound && htlc.payment_hash == payment_hash_calc &&
1020
htlc.state != HTLCState::LocalRemoved && htlc.state != HTLCState::LocalRemovedAwaitingCommitment {
1021
- if pending_idx != std::usize::MAX {
1022
- panic!("Duplicate HTLC payment_hash, ChannelManager should have prevented this!");
+ if let Some(PendingHTLCStatus::Fail(_)) = htlc.pending_forward_state {
+ } else {
1023
+ if pending_idx != std::usize::MAX {
1024
+ panic!("Duplicate HTLC payment_hash, ChannelManager should have prevented this!");
1025
+ }
1026
+ pending_idx = idx;
1027
}
- pending_idx = idx;
1028
1029
1030
if pending_idx == std::usize::MAX {
0 commit comments