@@ -1315,7 +1315,7 @@ macro_rules! convert_chan_err {
1315
1315
}
1316
1316
1317
1317
macro_rules! break_chan_entry {
1318
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1318
+ ( $self: ident, $res: expr, $entry: expr) => {
1319
1319
match $res {
1320
1320
Ok ( res) => res,
1321
1321
Err ( e) => {
@@ -1330,7 +1330,7 @@ macro_rules! break_chan_entry {
1330
1330
}
1331
1331
1332
1332
macro_rules! try_chan_entry {
1333
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1333
+ ( $self: ident, $res: expr, $entry: expr) => {
1334
1334
match $res {
1335
1335
Ok ( res) => res,
1336
1336
Err ( e) => {
@@ -1345,7 +1345,7 @@ macro_rules! try_chan_entry {
1345
1345
}
1346
1346
1347
1347
macro_rules! remove_channel {
1348
- ( $self: expr, $channel_state : expr , $ entry: expr) => {
1348
+ ( $self: expr, $entry: expr) => {
1349
1349
{
1350
1350
update_maps_on_chan_removal!( $self, $entry. get( ) ) ;
1351
1351
let removed_channel = $entry. remove_entry( ) . 1 ;
@@ -1424,17 +1424,17 @@ macro_rules! handle_monitor_err {
1424
1424
}
1425
1425
1426
1426
macro_rules! return_monitor_err {
1427
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1427
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1428
1428
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) ;
1429
1429
} ;
1430
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1430
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1431
1431
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment, $failed_forwards, $failed_fails) ;
1432
1432
}
1433
1433
}
1434
1434
1435
1435
// Does not break in case of TemporaryFailure!
1436
1436
macro_rules! maybe_break_monitor_err {
1437
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1437
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1438
1438
match ( handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) , $err) {
1439
1439
( e, ChannelMonitorUpdateErr :: PermanentFailure ) => {
1440
1440
break e;
@@ -1883,7 +1883,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1883
1883
let ( result, is_permanent) =
1884
1884
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
1885
1885
if is_permanent {
1886
- remove_channel ! ( self , channel_state , chan_entry) ;
1886
+ remove_channel ! ( self , chan_entry) ;
1887
1887
break result;
1888
1888
}
1889
1889
}
@@ -1895,7 +1895,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1895
1895
} ) ;
1896
1896
1897
1897
if chan_entry. get ( ) . is_shutdown ( ) {
1898
- let channel = remove_channel ! ( self , channel_state , chan_entry) ;
1898
+ let channel = remove_channel ! ( self , chan_entry) ;
1899
1899
if let Ok ( channel_update) = self . get_channel_update_for_broadcast ( & channel) {
1900
1900
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
1901
1901
msg : channel_update
@@ -1996,7 +1996,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1996
1996
} else {
1997
1997
self . issue_channel_close_events ( chan. get ( ) , ClosureReason :: HolderForceClosed ) ;
1998
1998
}
1999
- remove_channel ! ( self , channel_state , chan)
1999
+ remove_channel ! ( self , chan)
2000
2000
} else {
2001
2001
return Err ( APIError :: ChannelUnavailable { err : "No such channel" . to_owned ( ) } ) ;
2002
2002
}
@@ -2498,11 +2498,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2498
2498
payment_secret: payment_secret. clone( ) ,
2499
2499
payment_params: payment_params. clone( ) ,
2500
2500
} , onion_packet, & self . logger) ,
2501
- channel_state , chan)
2501
+ chan)
2502
2502
} {
2503
2503
Some ( ( update_add, commitment_signed, monitor_update) ) => {
2504
2504
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
2505
- maybe_break_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2505
+ maybe_break_monitor_err ! ( self , e, chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2506
2506
// Note that MonitorUpdateFailed here indicates (per function docs)
2507
2507
// that we will resend the commitment update once monitor updating
2508
2508
// is restored. Therefore, we must return an error indicating that
@@ -3304,7 +3304,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3304
3304
}
3305
3305
ChannelError :: Close ( msg) => {
3306
3306
log_trace ! ( self . logger, "Closing channel {} due to Close-required error: {}" , log_bytes!( chan. key( ) [ ..] ) , msg) ;
3307
- let mut channel = remove_channel ! ( self , channel_state , chan) ;
3307
+ let mut channel = remove_channel ! ( self , chan) ;
3308
3308
// ChannelClosed event is generated by handle_error for us.
3309
3309
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 ( ) ) )
3310
3310
} ,
@@ -4511,7 +4511,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4511
4511
}
4512
4512
} ;
4513
4513
channel_state. pending_msg_events . push ( send_msg_err_event) ;
4514
- let _ = remove_channel ! ( self , channel_state , channel) ;
4514
+ let _ = remove_channel ! ( self , channel) ;
4515
4515
return Err ( APIError :: APIMisuseError { err : "Please use accept_inbound_channel_from_trusted_peer_0conf to accept channels with zero confirmations." . to_owned ( ) } ) ;
4516
4516
}
4517
4517
@@ -4591,7 +4591,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4591
4591
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4592
4592
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4593
4593
}
4594
- try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , channel_state , chan) ;
4594
+ try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , chan) ;
4595
4595
( chan. get ( ) . get_value_satoshis ( ) , chan. get ( ) . get_funding_redeemscript ( ) . to_v0_p2wsh ( ) , chan. get ( ) . get_user_id ( ) )
4596
4596
} ,
4597
4597
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
@@ -4618,7 +4618,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4618
4618
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4619
4619
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4620
4620
}
4621
- ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , channel_state , chan) , chan. remove ( ) )
4621
+ ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , chan) , chan. remove ( ) )
4622
4622
} ,
4623
4623
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
4624
4624
}
@@ -4698,7 +4698,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4698
4698
}
4699
4699
let ( monitor, funding_tx, channel_ready) = match chan. get_mut ( ) . funding_signed ( & msg, best_block, & self . logger ) {
4700
4700
Ok ( update) => update,
4701
- Err ( e) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4701
+ Err ( e) => try_chan_entry ! ( self , Err ( e) , chan) ,
4702
4702
} ;
4703
4703
if let Err ( e) = self . chain_monitor . watch_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor) {
4704
4704
let mut res = handle_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , channel_ready. is_some( ) , OPTIONALLY_RESEND_FUNDING_LOCKED ) ;
@@ -4734,7 +4734,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4734
4734
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4735
4735
}
4736
4736
let announcement_sigs_opt = try_chan_entry ! ( self , chan. get_mut( ) . channel_ready( & msg, self . get_our_node_id( ) ,
4737
- self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , channel_state , chan) ;
4737
+ self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , chan) ;
4738
4738
if let Some ( announcement_sigs) = announcement_sigs_opt {
4739
4739
log_trace ! ( self . logger, "Sending announcement_signatures for channel {}" , log_bytes!( chan. get( ) . channel_id( ) ) ) ;
4740
4740
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendAnnouncementSignatures {
@@ -4779,7 +4779,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4779
4779
if chan_entry. get( ) . sent_shutdown( ) { " after we initiated shutdown" } else { "" } ) ;
4780
4780
}
4781
4781
4782
- let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , channel_state , chan_entry) ;
4782
+ let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , chan_entry) ;
4783
4783
dropped_htlcs = htlcs;
4784
4784
4785
4785
// Update the monitor with the shutdown script if necessary.
@@ -4788,7 +4788,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4788
4788
let ( result, is_permanent) =
4789
4789
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
4790
4790
if is_permanent {
4791
- remove_channel ! ( self , channel_state , chan_entry) ;
4791
+ remove_channel ! ( self , chan_entry) ;
4792
4792
break result;
4793
4793
}
4794
4794
}
@@ -4824,7 +4824,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4824
4824
if chan_entry. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4825
4825
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4826
4826
}
4827
- let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , channel_state , chan_entry) ;
4827
+ let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , chan_entry) ;
4828
4828
if let Some ( msg) = closing_signed {
4829
4829
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendClosingSigned {
4830
4830
node_id : counterparty_node_id. clone ( ) ,
@@ -4837,7 +4837,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4837
4837
// also implies there are no pending HTLCs left on the channel, so we can
4838
4838
// fully delete it from tracking (the channel monitor is still around to
4839
4839
// watch for old state broadcasts)!
4840
- ( tx, Some ( remove_channel ! ( self , channel_state , chan_entry) ) )
4840
+ ( tx, Some ( remove_channel ! ( self , chan_entry) ) )
4841
4841
} else { ( tx, None ) }
4842
4842
} ,
4843
4843
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4901,7 +4901,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4901
4901
_ => pending_forward_info
4902
4902
}
4903
4903
} ;
4904
- try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , channel_state , chan) ;
4904
+ try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , chan) ;
4905
4905
} ,
4906
4906
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4907
4907
}
@@ -4917,7 +4917,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4917
4917
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4918
4918
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4919
4919
}
4920
- try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , channel_state , chan)
4920
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , chan)
4921
4921
} ,
4922
4922
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4923
4923
}
@@ -4934,7 +4934,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4934
4934
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4935
4935
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4936
4936
}
4937
- try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , channel_state , chan) ;
4937
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , chan) ;
4938
4938
} ,
4939
4939
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4940
4940
}
@@ -4951,9 +4951,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4951
4951
}
4952
4952
if ( msg. failure_code & 0x8000 ) == 0 {
4953
4953
let chan_err: ChannelError = ChannelError :: Close ( "Got update_fail_malformed_htlc with BADONION not set" . to_owned ( ) ) ;
4954
- try_chan_entry ! ( self , Err ( chan_err) , channel_state , chan) ;
4954
+ try_chan_entry ! ( self , Err ( chan_err) , chan) ;
4955
4955
}
4956
- 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) ;
4956
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_malformed_htlc( & msg, HTLCFailReason :: Reason { failure_code: msg. failure_code, data: Vec :: new( ) } ) , chan) ;
4957
4957
Ok ( ( ) )
4958
4958
} ,
4959
4959
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4970,17 +4970,17 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4970
4970
}
4971
4971
let ( revoke_and_ack, commitment_signed, monitor_update) =
4972
4972
match chan. get_mut ( ) . commitment_signed ( & msg, & self . logger ) {
4973
- Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4973
+ Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , chan) ,
4974
4974
Err ( ( Some ( update) , e) ) => {
4975
4975
assert ! ( chan. get( ) . is_awaiting_monitor_update( ) ) ;
4976
4976
let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , update) ;
4977
- try_chan_entry ! ( self , Err ( e) , channel_state , chan) ;
4977
+ try_chan_entry ! ( self , Err ( e) , chan) ;
4978
4978
unreachable ! ( ) ;
4979
4979
} ,
4980
4980
Ok ( res) => res
4981
4981
} ;
4982
4982
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
4983
- return_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4983
+ return_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4984
4984
}
4985
4985
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendRevokeAndACK {
4986
4986
node_id : counterparty_node_id. clone ( ) ,
@@ -5055,7 +5055,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5055
5055
}
5056
5056
let was_frozen_for_monitor = chan. get ( ) . is_awaiting_monitor_update ( ) ;
5057
5057
let raa_updates = break_chan_entry ! ( self ,
5058
- chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , channel_state , chan) ;
5058
+ chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , chan) ;
5059
5059
htlcs_to_fail = raa_updates. holding_cell_failed_htlcs ;
5060
5060
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , raa_updates. monitor_update ) {
5061
5061
if was_frozen_for_monitor {
@@ -5114,7 +5114,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5114
5114
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
5115
5115
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
5116
5116
}
5117
- try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , channel_state , chan) ;
5117
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , chan) ;
5118
5118
} ,
5119
5119
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
5120
5120
}
@@ -5136,7 +5136,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5136
5136
5137
5137
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelAnnouncement {
5138
5138
msg : try_chan_entry ! ( self , chan. get_mut( ) . announcement_signatures(
5139
- self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , channel_state , chan) ,
5139
+ self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , chan) ,
5140
5140
// Note that announcement_signatures fails if the channel cannot be announced,
5141
5141
// so get_channel_update_for_broadcast will never fail by the time we get here.
5142
5142
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
if were_node_one == msg_from_node_one {
5175
5175
return Ok ( NotifyOption :: SkipPersist ) ;
5176
5176
} else {
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