@@ -114,7 +114,7 @@ enum TrustModel {
114
114
ClientTrustsLsp {
115
115
funding_tx_broadcast_safe : bool ,
116
116
payment_claimed : bool ,
117
- funding_tx : Option < Arc < Transaction > > ,
117
+ funding_tx : Option < Transaction > ,
118
118
} ,
119
119
LspTrustsClient ,
120
120
}
@@ -144,7 +144,7 @@ impl TrustModel {
144
144
}
145
145
}
146
146
147
- fn set_funding_tx ( & mut self , funding_tx : Arc < Transaction > ) {
147
+ fn set_funding_tx ( & mut self , funding_tx : Transaction ) {
148
148
match self {
149
149
TrustModel :: ClientTrustsLsp { funding_tx : tx, .. } => {
150
150
* tx = Some ( funding_tx) ;
@@ -177,9 +177,9 @@ impl TrustModel {
177
177
}
178
178
}
179
179
180
- fn get_funding_tx ( & self ) -> Option < Arc < Transaction > > {
180
+ fn get_funding_tx ( & self ) -> Option < Transaction > {
181
181
match self {
182
- TrustModel :: ClientTrustsLsp { funding_tx : Some ( tx ) , .. } => Some ( Arc :: clone ( & tx ) ) ,
182
+ TrustModel :: ClientTrustsLsp { funding_tx, .. } => funding_tx . clone ( ) ,
183
183
_ => None ,
184
184
}
185
185
}
@@ -518,7 +518,7 @@ impl OutboundJITChannel {
518
518
self . is_pending_initial_payment ( ) && is_expired
519
519
}
520
520
521
- fn set_funding_tx ( & mut self , funding_tx : Arc < Transaction > ) {
521
+ fn set_funding_tx ( & mut self , funding_tx : Transaction ) {
522
522
self . trust_model . set_funding_tx ( funding_tx) ;
523
523
}
524
524
@@ -530,7 +530,7 @@ impl OutboundJITChannel {
530
530
self . trust_model . should_manually_broadcast ( )
531
531
}
532
532
533
- fn get_funding_tx ( & self ) -> Option < Arc < Transaction > > {
533
+ fn get_funding_tx ( & self ) -> Option < Transaction > {
534
534
self . trust_model . get_funding_tx ( )
535
535
}
536
536
@@ -1575,8 +1575,7 @@ where
1575
1575
/// Called to store the funding transaction for a JIT channel.
1576
1576
/// This should be called when the funding transaction is created but before it's broadcast.
1577
1577
pub fn store_funding_transaction (
1578
- & self , user_channel_id : u128 , counterparty_node_id : & PublicKey ,
1579
- funding_tx : Arc < Transaction > ,
1578
+ & self , user_channel_id : u128 , counterparty_node_id : & PublicKey , funding_tx : Transaction ,
1580
1579
) -> Result < ( ) , APIError > {
1581
1580
let outer_state_lock = self . per_peer_state . read ( ) . unwrap ( ) ;
1582
1581
let inner_state_lock =
@@ -1656,7 +1655,7 @@ where
1656
1655
let event = LSPS2ServiceEvent :: BroadcastFundingTransaction {
1657
1656
counterparty_node_id : * counterparty_node_id,
1658
1657
user_channel_id : jit_channel. user_channel_id ,
1659
- funding_tx : funding_tx . as_ref ( ) . clone ( ) ,
1658
+ funding_tx,
1660
1659
} ;
1661
1660
event_queue_notifier. enqueue ( event) ;
1662
1661
}
0 commit comments