Skip to content

Commit 025257a

Browse files
committed
Drop unnecessary scope in process_pending_htlcs_forwards
1 parent 6d5ea06 commit 025257a

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6329,25 +6329,24 @@ where
63296329
let mut new_events = VecDeque::new();
63306330
let mut failed_forwards = Vec::new();
63316331
let mut phantom_receives: Vec<PerSourcePendingForward> = Vec::new();
6332-
{
6333-
let mut forward_htlcs = new_hash_map();
6334-
mem::swap(&mut forward_htlcs, &mut self.forward_htlcs.lock().unwrap());
6335-
6336-
for (short_chan_id, mut pending_forwards) in forward_htlcs {
6337-
if short_chan_id != 0 {
6338-
self.process_forward_htlcs(
6339-
short_chan_id,
6340-
&mut pending_forwards,
6341-
&mut failed_forwards,
6342-
&mut phantom_receives,
6343-
);
6344-
} else {
6345-
self.process_receive_htlcs(
6346-
&mut pending_forwards,
6347-
&mut new_events,
6348-
&mut failed_forwards,
6349-
);
6350-
}
6332+
6333+
let mut forward_htlcs = new_hash_map();
6334+
mem::swap(&mut forward_htlcs, &mut self.forward_htlcs.lock().unwrap());
6335+
6336+
for (short_chan_id, mut pending_forwards) in forward_htlcs {
6337+
if short_chan_id != 0 {
6338+
self.process_forward_htlcs(
6339+
short_chan_id,
6340+
&mut pending_forwards,
6341+
&mut failed_forwards,
6342+
&mut phantom_receives,
6343+
);
6344+
} else {
6345+
self.process_receive_htlcs(
6346+
&mut pending_forwards,
6347+
&mut new_events,
6348+
&mut failed_forwards,
6349+
);
63516350
}
63526351
}
63536352

0 commit comments

Comments
 (0)