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