Skip to content

Commit 85d1e5f

Browse files
authored
Merge pull request #3501 from contrun/simply-some-code
2 parents 463e432 + 988e5aa commit 85d1e5f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lightning/src/ln/channel.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -5180,13 +5180,10 @@ impl<SP: Deref> Channel<SP> where
51805180
}
51815181

51825182
for htlc in self.context.pending_inbound_htlcs.iter_mut() {
5183-
let htlc_resolution = if let &InboundHTLCState::RemoteAnnounced(ref resolution) = &htlc.state {
5184-
Some(resolution.clone())
5185-
} else { None };
5186-
if let Some(htlc_resolution) = htlc_resolution {
5183+
if let &InboundHTLCState::RemoteAnnounced(ref htlc_resolution) = &htlc.state {
51875184
log_trace!(logger, "Updating HTLC {} to AwaitingRemoteRevokeToAnnounce due to commitment_signed in channel {}.",
51885185
&htlc.payment_hash, &self.context.channel_id);
5189-
htlc.state = InboundHTLCState::AwaitingRemoteRevokeToAnnounce(htlc_resolution);
5186+
htlc.state = InboundHTLCState::AwaitingRemoteRevokeToAnnounce(htlc_resolution.clone());
51905187
need_commitment = true;
51915188
}
51925189
}

0 commit comments

Comments
 (0)