@@ -1310,7 +1310,7 @@ macro_rules! convert_chan_err {
1310
1310
}
1311
1311
1312
1312
macro_rules! break_chan_entry {
1313
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1313
+ ( $self: ident, $res: expr, $entry: expr) => {
1314
1314
match $res {
1315
1315
Ok ( res) => res,
1316
1316
Err ( e) => {
@@ -1325,7 +1325,7 @@ macro_rules! break_chan_entry {
1325
1325
}
1326
1326
1327
1327
macro_rules! try_chan_entry {
1328
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1328
+ ( $self: ident, $res: expr, $entry: expr) => {
1329
1329
match $res {
1330
1330
Ok ( res) => res,
1331
1331
Err ( e) => {
@@ -1340,7 +1340,7 @@ macro_rules! try_chan_entry {
1340
1340
}
1341
1341
1342
1342
macro_rules! remove_channel {
1343
- ( $self: expr, $channel_state : expr , $ entry: expr) => {
1343
+ ( $self: expr, $entry: expr) => {
1344
1344
{
1345
1345
let channel = $entry. remove_entry( ) . 1 ;
1346
1346
update_maps_on_chan_removal!( $self, channel) ;
@@ -1419,17 +1419,17 @@ macro_rules! handle_monitor_err {
1419
1419
}
1420
1420
1421
1421
macro_rules! return_monitor_err {
1422
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1422
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1423
1423
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) ;
1424
1424
} ;
1425
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1425
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1426
1426
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment, $failed_forwards, $failed_fails) ;
1427
1427
}
1428
1428
}
1429
1429
1430
1430
// Does not break in case of TemporaryFailure!
1431
1431
macro_rules! maybe_break_monitor_err {
1432
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1432
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1433
1433
match ( handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) , $err) {
1434
1434
( e, ChannelMonitorUpdateErr :: PermanentFailure ) => {
1435
1435
break e;
@@ -1878,7 +1878,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1878
1878
let ( result, is_permanent) =
1879
1879
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
1880
1880
if is_permanent {
1881
- remove_channel ! ( self , channel_state , chan_entry) ;
1881
+ remove_channel ! ( self , chan_entry) ;
1882
1882
break result;
1883
1883
}
1884
1884
}
@@ -1890,7 +1890,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1890
1890
} ) ;
1891
1891
1892
1892
if chan_entry. get ( ) . is_shutdown ( ) {
1893
- let channel = remove_channel ! ( self , channel_state , chan_entry) ;
1893
+ let channel = remove_channel ! ( self , chan_entry) ;
1894
1894
if let Ok ( channel_update) = self . get_channel_update_for_broadcast ( & channel) {
1895
1895
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
1896
1896
msg : channel_update
@@ -1991,7 +1991,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1991
1991
} else {
1992
1992
self . issue_channel_close_events ( chan. get ( ) , ClosureReason :: HolderForceClosed ) ;
1993
1993
}
1994
- remove_channel ! ( self , channel_state , chan)
1994
+ remove_channel ! ( self , chan)
1995
1995
} else {
1996
1996
return Err ( APIError :: ChannelUnavailable { err : "No such channel" . to_owned ( ) } ) ;
1997
1997
}
@@ -2493,11 +2493,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2493
2493
payment_secret: payment_secret. clone( ) ,
2494
2494
payment_params: payment_params. clone( ) ,
2495
2495
} , onion_packet, & self . logger) ,
2496
- channel_state , chan)
2496
+ chan)
2497
2497
} {
2498
2498
Some ( ( update_add, commitment_signed, monitor_update) ) => {
2499
2499
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
2500
- maybe_break_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2500
+ maybe_break_monitor_err ! ( self , e, chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2501
2501
// Note that MonitorUpdateFailed here indicates (per function docs)
2502
2502
// that we will resend the commitment update once monitor updating
2503
2503
// is restored. Therefore, we must return an error indicating that
@@ -3299,7 +3299,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3299
3299
}
3300
3300
ChannelError :: Close ( msg) => {
3301
3301
log_trace ! ( self . logger, "Closing channel {} due to Close-required error: {}" , log_bytes!( chan. key( ) [ ..] ) , msg) ;
3302
- let mut channel = remove_channel ! ( self , channel_state , chan) ;
3302
+ let mut channel = remove_channel ! ( self , chan) ;
3303
3303
// ChannelClosed event is generated by handle_error for us.
3304
3304
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 ( ) ) )
3305
3305
} ,
@@ -4516,7 +4516,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4516
4516
}
4517
4517
} ;
4518
4518
channel_state. pending_msg_events . push ( send_msg_err_event) ;
4519
- let _ = remove_channel ! ( self , channel_state , channel) ;
4519
+ let _ = remove_channel ! ( self , channel) ;
4520
4520
return Err ( APIError :: APIMisuseError { err : "Please use accept_inbound_channel_from_trusted_peer_0conf to accept channels with zero confirmations." . to_owned ( ) } ) ;
4521
4521
}
4522
4522
@@ -4596,7 +4596,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4596
4596
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4597
4597
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4598
4598
}
4599
- try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , channel_state , chan) ;
4599
+ try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , chan) ;
4600
4600
( chan. get ( ) . get_value_satoshis ( ) , chan. get ( ) . get_funding_redeemscript ( ) . to_v0_p2wsh ( ) , chan. get ( ) . get_user_id ( ) )
4601
4601
} ,
4602
4602
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
@@ -4623,7 +4623,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4623
4623
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4624
4624
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4625
4625
}
4626
- ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , channel_state , chan) , chan. remove ( ) )
4626
+ ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , chan) , chan. remove ( ) )
4627
4627
} ,
4628
4628
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
4629
4629
}
@@ -4697,7 +4697,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4697
4697
}
4698
4698
let ( monitor, funding_tx, channel_ready) = match chan. get_mut ( ) . funding_signed ( & msg, best_block, & self . logger ) {
4699
4699
Ok ( update) => update,
4700
- Err ( e) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4700
+ Err ( e) => try_chan_entry ! ( self , Err ( e) , chan) ,
4701
4701
} ;
4702
4702
if let Err ( e) = self . chain_monitor . watch_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor) {
4703
4703
let mut res = handle_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , channel_ready. is_some( ) , OPTIONALLY_RESEND_FUNDING_LOCKED ) ;
@@ -4733,7 +4733,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4733
4733
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4734
4734
}
4735
4735
let announcement_sigs_opt = try_chan_entry ! ( self , chan. get_mut( ) . channel_ready( & msg, self . get_our_node_id( ) ,
4736
- self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , channel_state , chan) ;
4736
+ self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , chan) ;
4737
4737
if let Some ( announcement_sigs) = announcement_sigs_opt {
4738
4738
log_trace ! ( self . logger, "Sending announcement_signatures for channel {}" , log_bytes!( chan. get( ) . channel_id( ) ) ) ;
4739
4739
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendAnnouncementSignatures {
@@ -4778,7 +4778,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4778
4778
if chan_entry. get( ) . sent_shutdown( ) { " after we initiated shutdown" } else { "" } ) ;
4779
4779
}
4780
4780
4781
- let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , channel_state , chan_entry) ;
4781
+ let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , chan_entry) ;
4782
4782
dropped_htlcs = htlcs;
4783
4783
4784
4784
// Update the monitor with the shutdown script if necessary.
@@ -4787,7 +4787,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4787
4787
let ( result, is_permanent) =
4788
4788
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
4789
4789
if is_permanent {
4790
- remove_channel ! ( self , channel_state , chan_entry) ;
4790
+ remove_channel ! ( self , chan_entry) ;
4791
4791
break result;
4792
4792
}
4793
4793
}
@@ -4823,7 +4823,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4823
4823
if chan_entry. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4824
4824
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4825
4825
}
4826
- let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , channel_state , chan_entry) ;
4826
+ let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , chan_entry) ;
4827
4827
if let Some ( msg) = closing_signed {
4828
4828
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendClosingSigned {
4829
4829
node_id : counterparty_node_id. clone ( ) ,
@@ -4836,7 +4836,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4836
4836
// also implies there are no pending HTLCs left on the channel, so we can
4837
4837
// fully delete it from tracking (the channel monitor is still around to
4838
4838
// watch for old state broadcasts)!
4839
- ( tx, Some ( remove_channel ! ( self , channel_state , chan_entry) ) )
4839
+ ( tx, Some ( remove_channel ! ( self , chan_entry) ) )
4840
4840
} else { ( tx, None ) }
4841
4841
} ,
4842
4842
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4900,7 +4900,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4900
4900
_ => pending_forward_info
4901
4901
}
4902
4902
} ;
4903
- try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , channel_state , chan) ;
4903
+ try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , chan) ;
4904
4904
} ,
4905
4905
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4906
4906
}
@@ -4916,7 +4916,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4916
4916
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4917
4917
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4918
4918
}
4919
- try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , channel_state , chan)
4919
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , chan)
4920
4920
} ,
4921
4921
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4922
4922
}
@@ -4933,7 +4933,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4933
4933
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4934
4934
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4935
4935
}
4936
- try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , channel_state , chan) ;
4936
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , chan) ;
4937
4937
} ,
4938
4938
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4939
4939
}
@@ -4950,9 +4950,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4950
4950
}
4951
4951
if ( msg. failure_code & 0x8000 ) == 0 {
4952
4952
let chan_err: ChannelError = ChannelError :: Close ( "Got update_fail_malformed_htlc with BADONION not set" . to_owned ( ) ) ;
4953
- try_chan_entry ! ( self , Err ( chan_err) , channel_state , chan) ;
4953
+ try_chan_entry ! ( self , Err ( chan_err) , chan) ;
4954
4954
}
4955
- 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) ;
4955
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_malformed_htlc( & msg, HTLCFailReason :: Reason { failure_code: msg. failure_code, data: Vec :: new( ) } ) , chan) ;
4956
4956
Ok ( ( ) )
4957
4957
} ,
4958
4958
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4969,17 +4969,17 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4969
4969
}
4970
4970
let ( revoke_and_ack, commitment_signed, monitor_update) =
4971
4971
match chan. get_mut ( ) . commitment_signed ( & msg, & self . logger ) {
4972
- Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4972
+ Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , chan) ,
4973
4973
Err ( ( Some ( update) , e) ) => {
4974
4974
assert ! ( chan. get( ) . is_awaiting_monitor_update( ) ) ;
4975
4975
let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , update) ;
4976
- try_chan_entry ! ( self , Err ( e) , channel_state , chan) ;
4976
+ try_chan_entry ! ( self , Err ( e) , chan) ;
4977
4977
unreachable ! ( ) ;
4978
4978
} ,
4979
4979
Ok ( res) => res
4980
4980
} ;
4981
4981
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
4982
- return_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4982
+ return_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4983
4983
}
4984
4984
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendRevokeAndACK {
4985
4985
node_id : counterparty_node_id. clone ( ) ,
@@ -5054,7 +5054,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5054
5054
}
5055
5055
let was_frozen_for_monitor = chan. get ( ) . is_awaiting_monitor_update ( ) ;
5056
5056
let raa_updates = break_chan_entry ! ( self ,
5057
- chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , channel_state , chan) ;
5057
+ chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , chan) ;
5058
5058
htlcs_to_fail = raa_updates. holding_cell_failed_htlcs ;
5059
5059
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , raa_updates. monitor_update ) {
5060
5060
if was_frozen_for_monitor {
@@ -5113,7 +5113,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5113
5113
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
5114
5114
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
5115
5115
}
5116
- try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , channel_state , chan) ;
5116
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , chan) ;
5117
5117
} ,
5118
5118
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
5119
5119
}
@@ -5135,7 +5135,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5135
5135
5136
5136
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelAnnouncement {
5137
5137
msg : try_chan_entry ! ( self , chan. get_mut( ) . announcement_signatures(
5138
- self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , channel_state , chan) ,
5138
+ self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , chan) ,
5139
5139
// Note that announcement_signatures fails if the channel cannot be announced,
5140
5140
// so get_channel_update_for_broadcast will never fail by the time we get here.
5141
5141
update_msg : self . get_channel_update_for_broadcast ( chan. get ( ) ) . unwrap ( ) ,
@@ -5174,7 +5174,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5174
5174
return Ok ( NotifyOption :: SkipPersist ) ;
5175
5175
} else {
5176
5176
log_debug ! ( self . logger, "Received channel_update for channel {}." , log_bytes!( chan_id) ) ;
5177
- try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , channel_state , chan) ;
5177
+ try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , chan) ;
5178
5178
}
5179
5179
} ,
5180
5180
hash_map:: Entry :: Vacant ( _) => unreachable ! ( )
@@ -5199,7 +5199,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5199
5199
// add-HTLCs on disconnect, we may be handed HTLCs to fail backwards here.
5200
5200
let responses = try_chan_entry ! ( self , chan. get_mut( ) . channel_reestablish(
5201
5201
msg, & self . logger, self . our_network_pubkey. clone( ) , self . genesis_hash,
5202
- & * self . best_block. read( ) . unwrap( ) ) , channel_state , chan) ;
5202
+ & * self . best_block. read( ) . unwrap( ) ) , chan) ;
5203
5203
let mut channel_update = None ;
5204
5204
if let Some ( msg) = responses. shutdown_msg {
5205
5205
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendShutdown {
@@ -5263,7 +5263,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5263
5263
let by_id = & mut channel_state. by_id ;
5264
5264
let pending_msg_events = & mut channel_state. pending_msg_events ;
5265
5265
if let hash_map:: Entry :: Occupied ( chan_entry) = by_id. entry ( funding_outpoint. to_channel_id ( ) ) {
5266
- let mut chan = remove_channel ! ( self , channel_state , chan_entry) ;
5266
+ let mut chan = remove_channel ! ( self , chan_entry) ;
5267
5267
failed_channels. push ( chan. force_shutdown ( false ) ) ;
5268
5268
if let Ok ( update) = self . get_channel_update_for_broadcast ( & chan) {
5269
5269
pending_msg_events. push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
0 commit comments