File tree Expand file tree Collapse file tree 1 file changed +25
-17
lines changed Expand file tree Collapse file tree 1 file changed +25
-17
lines changed Original file line number Diff line number Diff line change @@ -5350,27 +5350,35 @@ where
5350
5350
if let OutboundHTLCState::LocalAnnounced(_) = htlc.state {
5351
5351
for update in self.blocked_monitor_updates.iter() {
5352
5352
for update in update.update.updates.iter() {
5353
- match update {
5354
- ChannelMonitorUpdateStep::LatestCounterpartyCommitmentTXInfo {
5355
- htlc_outputs ,
5353
+ let have_htlc = match update {
5354
+ ChannelMonitorUpdateStep::LatestCounterpartyCommitment {
5355
+ htlc_data ,
5356
5356
..
5357
5357
} => {
5358
- let have_htlc = htlc_outputs.iter().any(|(_, source)| {
5359
- source.as_ref().map(|s| &**s) == Some(&htlc.source)
5360
- });
5361
- debug_assert!(have_htlc);
5362
- if have_htlc {
5363
- dropped_outbound_htlcs.push((
5364
- htlc.source.clone(),
5365
- htlc.payment_hash,
5366
- counterparty_node_id,
5367
- self.channel_id,
5368
- ));
5369
- }
5370
- continue 'htlc_iter;
5358
+ let dust =
5359
+ htlc_data.dust_htlcs.iter().map(|(_, source)| source.as_ref());
5360
+ let nondust =
5361
+ htlc_data.nondust_htlc_sources.iter().map(|s| Some(s));
5362
+ dust.chain(nondust).any(|source| source == Some(&htlc.source))
5371
5363
},
5372
- _ => {},
5364
+ ChannelMonitorUpdateStep::LatestCounterpartyCommitmentTXInfo {
5365
+ htlc_outputs,
5366
+ ..
5367
+ } => htlc_outputs.iter().any(|(_, source)| {
5368
+ source.as_ref().map(|s| &**s) == Some(&htlc.source)
5369
+ }),
5370
+ _ => continue,
5371
+ };
5372
+ debug_assert!(have_htlc);
5373
+ if have_htlc {
5374
+ dropped_outbound_htlcs.push((
5375
+ htlc.source.clone(),
5376
+ htlc.payment_hash,
5377
+ counterparty_node_id,
5378
+ self.channel_id,
5379
+ ));
5373
5380
}
5381
+ continue 'htlc_iter;
5374
5382
}
5375
5383
}
5376
5384
}
You can’t perform that action at this time.
0 commit comments