Skip to content

Commit 813dad2

Browse files
Remove unnecessary update_add clone on Channel ser
1 parent 3f383b0 commit 813dad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14565,7 +14565,7 @@ where
1456514565
}
1456614566
}
1456714567
let mut removed_htlc_attribution_data: Vec<&Option<AttributionData>> = Vec::new();
14568-
let mut inbound_committed_update_adds: Vec<Option<msgs::UpdateAddHTLC>> = Vec::new();
14568+
let mut inbound_committed_update_adds: Vec<&Option<msgs::UpdateAddHTLC>> = Vec::new();
1456914569
(self.context.pending_inbound_htlcs.len() as u64 - dropped_inbound_htlcs).write(writer)?;
1457014570
for htlc in self.context.pending_inbound_htlcs.iter() {
1457114571
if let &InboundHTLCState::RemoteAnnounced(_) = &htlc.state {
@@ -14587,7 +14587,7 @@ where
1458714587
},
1458814588
&InboundHTLCState::Committed { ref update_add_htlc_opt } => {
1458914589
3u8.write(writer)?;
14590-
inbound_committed_update_adds.push(update_add_htlc_opt.clone());
14590+
inbound_committed_update_adds.push(update_add_htlc_opt);
1459114591
},
1459214592
&InboundHTLCState::LocalRemoved(ref removal_reason) => {
1459314593
4u8.write(writer)?;

0 commit comments

Comments
 (0)