@@ -1307,7 +1307,7 @@ macro_rules! convert_chan_err {
1307
1307
}
1308
1308
1309
1309
macro_rules! break_chan_entry {
1310
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1310
+ ( $self: ident, $res: expr, $entry: expr) => {
1311
1311
match $res {
1312
1312
Ok ( res) => res,
1313
1313
Err ( e) => {
@@ -1322,7 +1322,7 @@ macro_rules! break_chan_entry {
1322
1322
}
1323
1323
1324
1324
macro_rules! try_chan_entry {
1325
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1325
+ ( $self: ident, $res: expr, $entry: expr) => {
1326
1326
match $res {
1327
1327
Ok ( res) => res,
1328
1328
Err ( e) => {
@@ -1337,7 +1337,7 @@ macro_rules! try_chan_entry {
1337
1337
}
1338
1338
1339
1339
macro_rules! remove_channel {
1340
- ( $self: expr, $channel_state : expr , $ entry: expr) => {
1340
+ ( $self: expr, $entry: expr) => {
1341
1341
{
1342
1342
let channel = $entry. remove_entry( ) . 1 ;
1343
1343
update_maps_on_chan_removal!( $self, channel) ;
@@ -1416,17 +1416,17 @@ macro_rules! handle_monitor_err {
1416
1416
}
1417
1417
1418
1418
macro_rules! return_monitor_err {
1419
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1419
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1420
1420
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) ;
1421
1421
} ;
1422
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1422
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1423
1423
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment, $failed_forwards, $failed_fails) ;
1424
1424
}
1425
1425
}
1426
1426
1427
1427
// Does not break in case of TemporaryFailure!
1428
1428
macro_rules! maybe_break_monitor_err {
1429
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1429
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1430
1430
match ( handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) , $err) {
1431
1431
( e, ChannelMonitorUpdateErr :: PermanentFailure ) => {
1432
1432
break e;
@@ -1875,7 +1875,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1875
1875
let ( result, is_permanent) =
1876
1876
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
1877
1877
if is_permanent {
1878
- remove_channel ! ( self , channel_state , chan_entry) ;
1878
+ remove_channel ! ( self , chan_entry) ;
1879
1879
break result;
1880
1880
}
1881
1881
}
@@ -1887,7 +1887,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1887
1887
} ) ;
1888
1888
1889
1889
if chan_entry. get ( ) . is_shutdown ( ) {
1890
- let channel = remove_channel ! ( self , channel_state , chan_entry) ;
1890
+ let channel = remove_channel ! ( self , chan_entry) ;
1891
1891
if let Ok ( channel_update) = self . get_channel_update_for_broadcast ( & channel) {
1892
1892
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
1893
1893
msg : channel_update
@@ -1988,7 +1988,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1988
1988
} else {
1989
1989
self . issue_channel_close_events ( chan. get ( ) , ClosureReason :: HolderForceClosed ) ;
1990
1990
}
1991
- remove_channel ! ( self , channel_state , chan)
1991
+ remove_channel ! ( self , chan)
1992
1992
} else {
1993
1993
return Err ( APIError :: ChannelUnavailable { err : "No such channel" . to_owned ( ) } ) ;
1994
1994
}
@@ -2490,11 +2490,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2490
2490
payment_secret: payment_secret. clone( ) ,
2491
2491
payment_params: payment_params. clone( ) ,
2492
2492
} , onion_packet, & self . logger) ,
2493
- channel_state , chan)
2493
+ chan)
2494
2494
} {
2495
2495
Some ( ( update_add, commitment_signed, monitor_update) ) => {
2496
2496
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
2497
- maybe_break_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2497
+ maybe_break_monitor_err ! ( self , e, chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2498
2498
// Note that MonitorUpdateFailed here indicates (per function docs)
2499
2499
// that we will resend the commitment update once monitor updating
2500
2500
// is restored. Therefore, we must return an error indicating that
@@ -3296,7 +3296,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3296
3296
}
3297
3297
ChannelError :: Close ( msg) => {
3298
3298
log_trace ! ( self . logger, "Closing channel {} due to Close-required error: {}" , log_bytes!( chan. key( ) [ ..] ) , msg) ;
3299
- let mut channel = remove_channel ! ( self , channel_state , chan) ;
3299
+ let mut channel = remove_channel ! ( self , chan) ;
3300
3300
// ChannelClosed event is generated by handle_error for us.
3301
3301
Err ( MsgHandleErrInternal :: from_finish_shutdown ( msg, channel. channel_id ( ) , channel. get_user_id ( ) , channel. force_shutdown ( true ) , self . get_channel_update_for_broadcast ( & channel) . ok ( ) ) )
3302
3302
} ,
@@ -4513,7 +4513,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4513
4513
}
4514
4514
} ;
4515
4515
channel_state. pending_msg_events . push ( send_msg_err_event) ;
4516
- let _ = remove_channel ! ( self , channel_state , channel) ;
4516
+ let _ = remove_channel ! ( self , channel) ;
4517
4517
return Err ( APIError :: APIMisuseError { err : "Please use accept_inbound_channel_from_trusted_peer_0conf to accept channels with zero confirmations." . to_owned ( ) } ) ;
4518
4518
}
4519
4519
@@ -4593,7 +4593,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4593
4593
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4594
4594
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4595
4595
}
4596
- try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , channel_state , chan) ;
4596
+ try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , chan) ;
4597
4597
( chan. get ( ) . get_value_satoshis ( ) , chan. get ( ) . get_funding_redeemscript ( ) . to_v0_p2wsh ( ) , chan. get ( ) . get_user_id ( ) )
4598
4598
} ,
4599
4599
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
@@ -4620,7 +4620,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4620
4620
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4621
4621
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4622
4622
}
4623
- ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , channel_state , chan) , chan. remove ( ) )
4623
+ ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , chan) , chan. remove ( ) )
4624
4624
} ,
4625
4625
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
4626
4626
}
@@ -4694,7 +4694,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4694
4694
}
4695
4695
let ( monitor, funding_tx, channel_ready) = match chan. get_mut ( ) . funding_signed ( & msg, best_block, & self . logger ) {
4696
4696
Ok ( update) => update,
4697
- Err ( e) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4697
+ Err ( e) => try_chan_entry ! ( self , Err ( e) , chan) ,
4698
4698
} ;
4699
4699
if let Err ( e) = self . chain_monitor . watch_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor) {
4700
4700
let mut res = handle_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , channel_ready. is_some( ) , OPTIONALLY_RESEND_FUNDING_LOCKED ) ;
@@ -4730,7 +4730,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4730
4730
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4731
4731
}
4732
4732
let announcement_sigs_opt = try_chan_entry ! ( self , chan. get_mut( ) . channel_ready( & msg, self . get_our_node_id( ) ,
4733
- self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , channel_state , chan) ;
4733
+ self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , chan) ;
4734
4734
if let Some ( announcement_sigs) = announcement_sigs_opt {
4735
4735
log_trace ! ( self . logger, "Sending announcement_signatures for channel {}" , log_bytes!( chan. get( ) . channel_id( ) ) ) ;
4736
4736
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendAnnouncementSignatures {
@@ -4775,7 +4775,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4775
4775
if chan_entry. get( ) . sent_shutdown( ) { " after we initiated shutdown" } else { "" } ) ;
4776
4776
}
4777
4777
4778
- let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , channel_state , chan_entry) ;
4778
+ let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , chan_entry) ;
4779
4779
dropped_htlcs = htlcs;
4780
4780
4781
4781
// Update the monitor with the shutdown script if necessary.
@@ -4784,7 +4784,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4784
4784
let ( result, is_permanent) =
4785
4785
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
4786
4786
if is_permanent {
4787
- remove_channel ! ( self , channel_state , chan_entry) ;
4787
+ remove_channel ! ( self , chan_entry) ;
4788
4788
break result;
4789
4789
}
4790
4790
}
@@ -4820,7 +4820,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4820
4820
if chan_entry. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4821
4821
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4822
4822
}
4823
- let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , channel_state , chan_entry) ;
4823
+ let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , chan_entry) ;
4824
4824
if let Some ( msg) = closing_signed {
4825
4825
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendClosingSigned {
4826
4826
node_id : counterparty_node_id. clone ( ) ,
@@ -4833,7 +4833,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4833
4833
// also implies there are no pending HTLCs left on the channel, so we can
4834
4834
// fully delete it from tracking (the channel monitor is still around to
4835
4835
// watch for old state broadcasts)!
4836
- ( tx, Some ( remove_channel ! ( self , channel_state , chan_entry) ) )
4836
+ ( tx, Some ( remove_channel ! ( self , chan_entry) ) )
4837
4837
} else { ( tx, None ) }
4838
4838
} ,
4839
4839
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4897,7 +4897,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4897
4897
_ => pending_forward_info
4898
4898
}
4899
4899
} ;
4900
- try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , channel_state , chan) ;
4900
+ try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , chan) ;
4901
4901
} ,
4902
4902
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4903
4903
}
@@ -4913,7 +4913,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4913
4913
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4914
4914
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4915
4915
}
4916
- try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , channel_state , chan)
4916
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , chan)
4917
4917
} ,
4918
4918
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4919
4919
}
@@ -4930,7 +4930,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4930
4930
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4931
4931
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4932
4932
}
4933
- try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , channel_state , chan) ;
4933
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , chan) ;
4934
4934
} ,
4935
4935
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4936
4936
}
@@ -4947,9 +4947,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4947
4947
}
4948
4948
if ( msg. failure_code & 0x8000 ) == 0 {
4949
4949
let chan_err: ChannelError = ChannelError :: Close ( "Got update_fail_malformed_htlc with BADONION not set" . to_owned ( ) ) ;
4950
- try_chan_entry ! ( self , Err ( chan_err) , channel_state , chan) ;
4950
+ try_chan_entry ! ( self , Err ( chan_err) , chan) ;
4951
4951
}
4952
- try_chan_entry ! ( self , chan. get_mut( ) . update_fail_malformed_htlc( & msg, HTLCFailReason :: Reason { failure_code: msg. failure_code, data: Vec :: new( ) } ) , channel_state , chan) ;
4952
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_malformed_htlc( & msg, HTLCFailReason :: Reason { failure_code: msg. failure_code, data: Vec :: new( ) } ) , chan) ;
4953
4953
Ok ( ( ) )
4954
4954
} ,
4955
4955
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4966,17 +4966,17 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4966
4966
}
4967
4967
let ( revoke_and_ack, commitment_signed, monitor_update) =
4968
4968
match chan. get_mut ( ) . commitment_signed ( & msg, & self . logger ) {
4969
- Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4969
+ Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , chan) ,
4970
4970
Err ( ( Some ( update) , e) ) => {
4971
4971
assert ! ( chan. get( ) . is_awaiting_monitor_update( ) ) ;
4972
4972
let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , update) ;
4973
- try_chan_entry ! ( self , Err ( e) , channel_state , chan) ;
4973
+ try_chan_entry ! ( self , Err ( e) , chan) ;
4974
4974
unreachable ! ( ) ;
4975
4975
} ,
4976
4976
Ok ( res) => res
4977
4977
} ;
4978
4978
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
4979
- return_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4979
+ return_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4980
4980
}
4981
4981
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendRevokeAndACK {
4982
4982
node_id : counterparty_node_id. clone ( ) ,
@@ -5051,7 +5051,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5051
5051
}
5052
5052
let was_frozen_for_monitor = chan. get ( ) . is_awaiting_monitor_update ( ) ;
5053
5053
let raa_updates = break_chan_entry ! ( self ,
5054
- chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , channel_state , chan) ;
5054
+ chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , chan) ;
5055
5055
htlcs_to_fail = raa_updates. holding_cell_failed_htlcs ;
5056
5056
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , raa_updates. monitor_update ) {
5057
5057
if was_frozen_for_monitor {
@@ -5110,7 +5110,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5110
5110
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
5111
5111
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
5112
5112
}
5113
- try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , channel_state , chan) ;
5113
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , chan) ;
5114
5114
} ,
5115
5115
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
5116
5116
}
@@ -5132,7 +5132,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5132
5132
5133
5133
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelAnnouncement {
5134
5134
msg : try_chan_entry ! ( self , chan. get_mut( ) . announcement_signatures(
5135
- self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , channel_state , chan) ,
5135
+ self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , chan) ,
5136
5136
// Note that announcement_signatures fails if the channel cannot be announced,
5137
5137
// so get_channel_update_for_broadcast will never fail by the time we get here.
5138
5138
update_msg : self . get_channel_update_for_broadcast ( chan. get ( ) ) . unwrap ( ) ,
@@ -5171,7 +5171,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5171
5171
return Ok ( NotifyOption :: SkipPersist ) ;
5172
5172
} else {
5173
5173
log_debug ! ( self . logger, "Received channel_update for channel {}." , log_bytes!( chan_id) ) ;
5174
- try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , channel_state , chan) ;
5174
+ try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , chan) ;
5175
5175
}
5176
5176
} ,
5177
5177
hash_map:: Entry :: Vacant ( _) => unreachable ! ( )
@@ -5196,7 +5196,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5196
5196
// add-HTLCs on disconnect, we may be handed HTLCs to fail backwards here.
5197
5197
let responses = try_chan_entry ! ( self , chan. get_mut( ) . channel_reestablish(
5198
5198
msg, & self . logger, self . our_network_pubkey. clone( ) , self . genesis_hash,
5199
- & * self . best_block. read( ) . unwrap( ) ) , channel_state , chan) ;
5199
+ & * self . best_block. read( ) . unwrap( ) ) , chan) ;
5200
5200
let mut channel_update = None ;
5201
5201
if let Some ( msg) = responses. shutdown_msg {
5202
5202
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendShutdown {
@@ -5260,7 +5260,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5260
5260
let by_id = & mut channel_state. by_id ;
5261
5261
let pending_msg_events = & mut channel_state. pending_msg_events ;
5262
5262
if let hash_map:: Entry :: Occupied ( chan_entry) = by_id. entry ( funding_outpoint. to_channel_id ( ) ) {
5263
- let mut chan = remove_channel ! ( self , channel_state , chan_entry) ;
5263
+ let mut chan = remove_channel ! ( self , chan_entry) ;
5264
5264
failed_channels. push ( chan. force_shutdown ( false ) ) ;
5265
5265
if let Ok ( update) = self . get_channel_update_for_broadcast ( & chan) {
5266
5266
pending_msg_events. push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
0 commit comments