@@ -487,14 +487,14 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
487
487
let feerate = fee_estimator. get_est_sat_per_1000_weight ( ConfirmationTarget :: Normal ) ;
488
488
489
489
Ok ( Channel {
490
- user_id : user_id ,
490
+ user_id,
491
491
config : config. channel_options . clone ( ) ,
492
492
493
493
channel_id : keys_provider. get_secure_random_bytes ( ) ,
494
494
channel_state : ChannelState :: OurInitSent as u32 ,
495
495
channel_outbound : true ,
496
496
secp_ctx : Secp256k1 :: new ( ) ,
497
- channel_value_satoshis : channel_value_satoshis ,
497
+ channel_value_satoshis,
498
498
499
499
latest_monitor_update_id : 0 ,
500
500
@@ -715,7 +715,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
715
715
} else { None } ;
716
716
717
717
let chan = Channel {
718
- user_id : user_id ,
718
+ user_id,
719
719
config : local_config,
720
720
721
721
channel_id : msg. temporary_channel_id ,
@@ -766,7 +766,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
766
766
feerate_per_kw : msg. feerate_per_kw ,
767
767
channel_value_satoshis : msg. funding_satoshis ,
768
768
counterparty_dust_limit_satoshis : msg. dust_limit_satoshis ,
769
- holder_dust_limit_satoshis : holder_dust_limit_satoshis ,
769
+ holder_dust_limit_satoshis,
770
770
counterparty_max_htlc_value_in_flight_msat : cmp:: min ( msg. max_htlc_value_in_flight_msat , msg. funding_satoshis * 1000 ) ,
771
771
counterparty_selected_channel_reserve_satoshis : msg. channel_reserve_satoshis ,
772
772
counterparty_htlc_minimum_msat : msg. htlc_minimum_msat ,
@@ -1579,7 +1579,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1579
1579
1580
1580
Ok ( ( msgs:: FundingSigned {
1581
1581
channel_id : self . channel_id ,
1582
- signature : signature
1582
+ signature
1583
1583
} , channel_monitor) )
1584
1584
}
1585
1585
@@ -2135,8 +2135,8 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2135
2135
2136
2136
Ok ( ( msgs:: RevokeAndACK {
2137
2137
channel_id : self . channel_id ,
2138
- per_commitment_secret : per_commitment_secret ,
2139
- next_per_commitment_point : next_per_commitment_point ,
2138
+ per_commitment_secret,
2139
+ next_per_commitment_point,
2140
2140
} , commitment_signed, closing_signed, monitor_update) )
2141
2141
}
2142
2142
@@ -2240,7 +2240,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2240
2240
update_fulfill_htlcs,
2241
2241
update_fail_htlcs,
2242
2242
update_fail_malformed_htlcs : Vec :: new ( ) ,
2243
- update_fee : update_fee ,
2243
+ update_fee,
2244
2244
commitment_signed,
2245
2245
} , monitor_update) ) , htlcs_to_fail) )
2246
2246
} else {
@@ -2497,7 +2497,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2497
2497
2498
2498
Some ( msgs:: UpdateFee {
2499
2499
channel_id : self . channel_id ,
2500
- feerate_per_kw : feerate_per_kw ,
2500
+ feerate_per_kw,
2501
2501
} )
2502
2502
}
2503
2503
@@ -2623,7 +2623,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2623
2623
let next_per_commitment_point = self . holder_keys . get_per_commitment_point ( self . cur_holder_commitment_transaction_number , & self . secp_ctx ) ;
2624
2624
Some ( msgs:: FundingLocked {
2625
2625
channel_id : self . channel_id ( ) ,
2626
- next_per_commitment_point : next_per_commitment_point ,
2626
+ next_per_commitment_point,
2627
2627
} )
2628
2628
} else { None } ;
2629
2629
@@ -2798,7 +2798,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2798
2798
let next_per_commitment_point = self . holder_keys . get_per_commitment_point ( self . cur_holder_commitment_transaction_number , & self . secp_ctx ) ;
2799
2799
return Ok ( ( Some ( msgs:: FundingLocked {
2800
2800
channel_id : self . channel_id ( ) ,
2801
- next_per_commitment_point : next_per_commitment_point ,
2801
+ next_per_commitment_point,
2802
2802
} ) , None , None , None , RAACommitmentOrder :: CommitmentFirst , shutdown_msg) ) ;
2803
2803
}
2804
2804
@@ -2828,7 +2828,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
2828
2828
let next_per_commitment_point = self . holder_keys . get_per_commitment_point ( self . cur_holder_commitment_transaction_number , & self . secp_ctx ) ;
2829
2829
Some ( msgs:: FundingLocked {
2830
2830
channel_id : self . channel_id ( ) ,
2831
- next_per_commitment_point : next_per_commitment_point ,
2831
+ next_per_commitment_point,
2832
2832
} )
2833
2833
} else { None } ;
2834
2834
@@ -3443,7 +3443,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3443
3443
let next_per_commitment_point = self . holder_keys . get_per_commitment_point ( self . cur_holder_commitment_transaction_number , & self . secp_ctx ) ;
3444
3444
return Ok ( ( Some ( msgs:: FundingLocked {
3445
3445
channel_id : self . channel_id ,
3446
- next_per_commitment_point : next_per_commitment_point ,
3446
+ next_per_commitment_point,
3447
3447
} ) , timed_out_htlcs) ) ;
3448
3448
} else {
3449
3449
self . monitor_pending_funding_locked = true ;
@@ -3492,7 +3492,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3492
3492
let keys = self . holder_keys . pubkeys ( ) ;
3493
3493
3494
3494
msgs:: OpenChannel {
3495
- chain_hash : chain_hash ,
3495
+ chain_hash,
3496
3496
temporary_channel_id : self . channel_id ,
3497
3497
funding_satoshis : self . channel_value_satoshis ,
3498
3498
push_msat : self . channel_value_satoshis * 1000 - self . value_to_self_msat ,
@@ -3597,7 +3597,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3597
3597
temporary_channel_id,
3598
3598
funding_txid : funding_txo. txid ,
3599
3599
funding_output_index : funding_txo. index ,
3600
- signature : signature
3600
+ signature
3601
3601
} )
3602
3602
}
3603
3603
@@ -3624,7 +3624,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3624
3624
3625
3625
let msg = msgs:: UnsignedChannelAnnouncement {
3626
3626
features : ChannelFeatures :: known ( ) ,
3627
- chain_hash : chain_hash ,
3627
+ chain_hash,
3628
3628
short_channel_id : self . get_short_channel_id ( ) . unwrap ( ) ,
3629
3629
node_id_1 : if were_node_one { node_id } else { self . get_counterparty_node_id ( ) } ,
3630
3630
node_id_2 : if were_node_one { self . get_counterparty_node_id ( ) } else { node_id } ,
0 commit comments