Skip to content

Commit 3292ef1

Browse files
committed
Drop excess Transaction clone in LSPS2 service
1 parent aa813a2 commit 3292ef1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning-liquidity/src/lsps2/service.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ impl TrustModel {
166166
}
167167
}
168168

169-
fn get_funding_tx(&self) -> Option<Transaction> {
169+
fn get_funding_tx(&self) -> Option<&Transaction> {
170170
match self {
171-
TrustModel::ClientTrustsLsp { funding_tx, .. } => funding_tx.clone(),
171+
TrustModel::ClientTrustsLsp { funding_tx, .. } => funding_tx.as_ref(),
172172
_ => None,
173173
}
174174
}
@@ -581,7 +581,7 @@ impl OutboundJITChannel {
581581
}
582582
}
583583

584-
fn get_funding_tx(&self) -> Option<Transaction> {
584+
fn get_funding_tx(&self) -> Option<&Transaction> {
585585
self.trust_model.get_funding_tx()
586586
}
587587

@@ -2028,7 +2028,7 @@ where
20282028
}
20292029

20302030
if let Some(funding_tx) = jit_channel.get_funding_tx() {
2031-
self.tx_broadcaster.broadcast_transactions(&[&funding_tx]);
2031+
self.tx_broadcaster.broadcast_transactions(&[funding_tx]);
20322032
}
20332033
}
20342034
}

0 commit comments

Comments
 (0)