@@ -1303,7 +1303,7 @@ macro_rules! convert_chan_err {
1303
1303
}
1304
1304
1305
1305
macro_rules! break_chan_entry {
1306
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1306
+ ( $self: ident, $res: expr, $entry: expr) => {
1307
1307
match $res {
1308
1308
Ok ( res) => res,
1309
1309
Err ( e) => {
@@ -1318,7 +1318,7 @@ macro_rules! break_chan_entry {
1318
1318
}
1319
1319
1320
1320
macro_rules! try_chan_entry {
1321
- ( $self: ident, $res: expr, $channel_state : expr , $ entry: expr) => {
1321
+ ( $self: ident, $res: expr, $entry: expr) => {
1322
1322
match $res {
1323
1323
Ok ( res) => res,
1324
1324
Err ( e) => {
@@ -1333,7 +1333,7 @@ macro_rules! try_chan_entry {
1333
1333
}
1334
1334
1335
1335
macro_rules! remove_channel {
1336
- ( $self: expr, $channel_state : expr , $ entry: expr) => {
1336
+ ( $self: expr, $entry: expr) => {
1337
1337
{
1338
1338
let channel = $entry. remove_entry( ) . 1 ;
1339
1339
update_maps_on_chan_removal!( $self, channel) ;
@@ -1412,17 +1412,17 @@ macro_rules! handle_monitor_err {
1412
1412
}
1413
1413
1414
1414
macro_rules! return_monitor_err {
1415
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1415
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1416
1416
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) ;
1417
1417
} ;
1418
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1418
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
1419
1419
return handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment, $failed_forwards, $failed_fails) ;
1420
1420
}
1421
1421
}
1422
1422
1423
1423
// Does not break in case of TemporaryFailure!
1424
1424
macro_rules! maybe_break_monitor_err {
1425
- ( $self: ident, $err: expr, $channel_state : expr , $ entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1425
+ ( $self: ident, $err: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr) => {
1426
1426
match ( handle_monitor_err!( $self, $err, $entry, $action_type, $resend_raa, $resend_commitment) , $err) {
1427
1427
( e, ChannelMonitorUpdateErr :: PermanentFailure ) => {
1428
1428
break e;
@@ -1871,7 +1871,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1871
1871
let ( result, is_permanent) =
1872
1872
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
1873
1873
if is_permanent {
1874
- remove_channel ! ( self , channel_state , chan_entry) ;
1874
+ remove_channel ! ( self , chan_entry) ;
1875
1875
break result;
1876
1876
}
1877
1877
}
@@ -1883,7 +1883,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1883
1883
} ) ;
1884
1884
1885
1885
if chan_entry. get ( ) . is_shutdown ( ) {
1886
- let channel = remove_channel ! ( self , channel_state , chan_entry) ;
1886
+ let channel = remove_channel ! ( self , chan_entry) ;
1887
1887
if let Ok ( channel_update) = self . get_channel_update_for_broadcast ( & channel) {
1888
1888
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
1889
1889
msg : channel_update
@@ -1984,7 +1984,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1984
1984
} else {
1985
1985
self . issue_channel_close_events ( chan. get ( ) , ClosureReason :: HolderForceClosed ) ;
1986
1986
}
1987
- remove_channel ! ( self , channel_state , chan)
1987
+ remove_channel ! ( self , chan)
1988
1988
} else {
1989
1989
return Err ( APIError :: ChannelUnavailable { err : "No such channel" . to_owned ( ) } ) ;
1990
1990
}
@@ -2486,11 +2486,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2486
2486
payment_secret: payment_secret. clone( ) ,
2487
2487
payment_params: payment_params. clone( ) ,
2488
2488
} , onion_packet, & self . logger) ,
2489
- channel_state , chan)
2489
+ chan)
2490
2490
} {
2491
2491
Some ( ( update_add, commitment_signed, monitor_update) ) => {
2492
2492
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
2493
- maybe_break_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2493
+ maybe_break_monitor_err ! ( self , e, chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
2494
2494
// Note that MonitorUpdateFailed here indicates (per function docs)
2495
2495
// that we will resend the commitment update once monitor updating
2496
2496
// is restored. Therefore, we must return an error indicating that
@@ -3292,7 +3292,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3292
3292
}
3293
3293
ChannelError :: Close ( msg) => {
3294
3294
log_trace ! ( self . logger, "Closing channel {} due to Close-required error: {}" , log_bytes!( chan. key( ) [ ..] ) , msg) ;
3295
- let mut channel = remove_channel ! ( self , channel_state , chan) ;
3295
+ let mut channel = remove_channel ! ( self , chan) ;
3296
3296
// ChannelClosed event is generated by handle_error for us.
3297
3297
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 ( ) ) )
3298
3298
} ,
@@ -4499,7 +4499,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4499
4499
}
4500
4500
} ;
4501
4501
channel_state. pending_msg_events . push ( send_msg_err_event) ;
4502
- let _ = remove_channel ! ( self , channel_state , channel) ;
4502
+ let _ = remove_channel ! ( self , channel) ;
4503
4503
return Err ( APIError :: APIMisuseError { err : "Please use accept_inbound_channel_from_trusted_peer_0conf to accept channels with zero confirmations." . to_owned ( ) } ) ;
4504
4504
}
4505
4505
@@ -4579,7 +4579,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4579
4579
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4580
4580
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4581
4581
}
4582
- try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , channel_state , chan) ;
4582
+ try_chan_entry ! ( self , chan. get_mut( ) . accept_channel( & msg, & self . default_configuration. channel_handshake_limits, & their_features) , chan) ;
4583
4583
( chan. get ( ) . get_value_satoshis ( ) , chan. get ( ) . get_funding_redeemscript ( ) . to_v0_p2wsh ( ) , chan. get ( ) . get_user_id ( ) )
4584
4584
} ,
4585
4585
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
@@ -4606,7 +4606,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4606
4606
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4607
4607
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. temporary_channel_id ) ) ;
4608
4608
}
4609
- ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , channel_state , chan) , chan. remove ( ) )
4609
+ ( try_chan_entry ! ( self , chan. get_mut( ) . funding_created( msg, best_block, & self . logger) , chan) , chan. remove ( ) )
4610
4610
} ,
4611
4611
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. temporary_channel_id ) )
4612
4612
}
@@ -4680,7 +4680,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4680
4680
}
4681
4681
let ( monitor, funding_tx, channel_ready) = match chan. get_mut ( ) . funding_signed ( & msg, best_block, & self . logger ) {
4682
4682
Ok ( update) => update,
4683
- Err ( e) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4683
+ Err ( e) => try_chan_entry ! ( self , Err ( e) , chan) ,
4684
4684
} ;
4685
4685
if let Err ( e) = self . chain_monitor . watch_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor) {
4686
4686
let mut res = handle_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , channel_ready. is_some( ) , OPTIONALLY_RESEND_FUNDING_LOCKED ) ;
@@ -4716,7 +4716,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4716
4716
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4717
4717
}
4718
4718
let announcement_sigs_opt = try_chan_entry ! ( self , chan. get_mut( ) . channel_ready( & msg, self . get_our_node_id( ) ,
4719
- self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , channel_state , chan) ;
4719
+ self . genesis_hash. clone( ) , & self . best_block. read( ) . unwrap( ) , & self . logger) , chan) ;
4720
4720
if let Some ( announcement_sigs) = announcement_sigs_opt {
4721
4721
log_trace ! ( self . logger, "Sending announcement_signatures for channel {}" , log_bytes!( chan. get( ) . channel_id( ) ) ) ;
4722
4722
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendAnnouncementSignatures {
@@ -4761,7 +4761,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4761
4761
if chan_entry. get( ) . sent_shutdown( ) { " after we initiated shutdown" } else { "" } ) ;
4762
4762
}
4763
4763
4764
- let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , channel_state , chan_entry) ;
4764
+ let ( shutdown, monitor_update, htlcs) = try_chan_entry ! ( self , chan_entry. get_mut( ) . shutdown( & self . keys_manager, & their_features, & msg) , chan_entry) ;
4765
4765
dropped_htlcs = htlcs;
4766
4766
4767
4767
// Update the monitor with the shutdown script if necessary.
@@ -4770,7 +4770,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4770
4770
let ( result, is_permanent) =
4771
4771
handle_monitor_err ! ( self , e, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
4772
4772
if is_permanent {
4773
- remove_channel ! ( self , channel_state , chan_entry) ;
4773
+ remove_channel ! ( self , chan_entry) ;
4774
4774
break result;
4775
4775
}
4776
4776
}
@@ -4806,7 +4806,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4806
4806
if chan_entry. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4807
4807
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4808
4808
}
4809
- let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , channel_state , chan_entry) ;
4809
+ let ( closing_signed, tx) = try_chan_entry ! ( self , chan_entry. get_mut( ) . closing_signed( & self . fee_estimator, & msg) , chan_entry) ;
4810
4810
if let Some ( msg) = closing_signed {
4811
4811
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendClosingSigned {
4812
4812
node_id : counterparty_node_id. clone ( ) ,
@@ -4819,7 +4819,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4819
4819
// also implies there are no pending HTLCs left on the channel, so we can
4820
4820
// fully delete it from tracking (the channel monitor is still around to
4821
4821
// watch for old state broadcasts)!
4822
- ( tx, Some ( remove_channel ! ( self , channel_state , chan_entry) ) )
4822
+ ( tx, Some ( remove_channel ! ( self , chan_entry) ) )
4823
4823
} else { ( tx, None ) }
4824
4824
} ,
4825
4825
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4883,7 +4883,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4883
4883
_ => pending_forward_info
4884
4884
}
4885
4885
} ;
4886
- try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , channel_state , chan) ;
4886
+ try_chan_entry ! ( self , chan. get_mut( ) . update_add_htlc( & msg, pending_forward_info, create_pending_htlc_status, & self . logger) , chan) ;
4887
4887
} ,
4888
4888
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4889
4889
}
@@ -4899,7 +4899,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4899
4899
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
4900
4900
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
4901
4901
}
4902
- try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , channel_state , chan)
4902
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fulfill_htlc( & msg) , chan)
4903
4903
} ,
4904
4904
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
4905
4905
}
@@ -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_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , channel_state , chan) ;
4919
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_htlc( & msg, HTLCFailReason :: LightningError { err: msg. reason. clone( ) } ) , 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,9 +4933,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4933
4933
}
4934
4934
if ( msg. failure_code & 0x8000 ) == 0 {
4935
4935
let chan_err: ChannelError = ChannelError :: Close ( "Got update_fail_malformed_htlc with BADONION not set" . to_owned ( ) ) ;
4936
- try_chan_entry ! ( self , Err ( chan_err) , channel_state , chan) ;
4936
+ try_chan_entry ! ( self , Err ( chan_err) , chan) ;
4937
4937
}
4938
- 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) ;
4938
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fail_malformed_htlc( & msg, HTLCFailReason :: Reason { failure_code: msg. failure_code, data: Vec :: new( ) } ) , chan) ;
4939
4939
Ok ( ( ) )
4940
4940
} ,
4941
4941
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
@@ -4952,17 +4952,17 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
4952
4952
}
4953
4953
let ( revoke_and_ack, commitment_signed, monitor_update) =
4954
4954
match chan. get_mut ( ) . commitment_signed ( & msg, & self . logger ) {
4955
- Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , channel_state , chan) ,
4955
+ Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , chan) ,
4956
4956
Err ( ( Some ( update) , e) ) => {
4957
4957
assert ! ( chan. get( ) . is_awaiting_monitor_update( ) ) ;
4958
4958
let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , update) ;
4959
- try_chan_entry ! ( self , Err ( e) , channel_state , chan) ;
4959
+ try_chan_entry ! ( self , Err ( e) , chan) ;
4960
4960
unreachable ! ( ) ;
4961
4961
} ,
4962
4962
Ok ( res) => res
4963
4963
} ;
4964
4964
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
4965
- return_monitor_err ! ( self , e, channel_state , chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4965
+ return_monitor_err ! ( self , e, chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) ;
4966
4966
}
4967
4967
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendRevokeAndACK {
4968
4968
node_id : counterparty_node_id. clone ( ) ,
@@ -5037,7 +5037,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5037
5037
}
5038
5038
let was_frozen_for_monitor = chan. get ( ) . is_awaiting_monitor_update ( ) ;
5039
5039
let raa_updates = break_chan_entry ! ( self ,
5040
- chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , channel_state , chan) ;
5040
+ chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , chan) ;
5041
5041
htlcs_to_fail = raa_updates. holding_cell_failed_htlcs ;
5042
5042
if let Err ( e) = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , raa_updates. monitor_update ) {
5043
5043
if was_frozen_for_monitor {
@@ -5096,7 +5096,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5096
5096
if chan. get ( ) . get_counterparty_node_id ( ) != * counterparty_node_id {
5097
5097
return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Got a message for a channel from the wrong node!" . to_owned ( ) , msg. channel_id ) ) ;
5098
5098
}
5099
- try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , channel_state , chan) ;
5099
+ try_chan_entry ! ( self , chan. get_mut( ) . update_fee( & self . fee_estimator, & msg) , chan) ;
5100
5100
} ,
5101
5101
hash_map:: Entry :: Vacant ( _) => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Failed to find corresponding channel" . to_owned ( ) , msg. channel_id ) )
5102
5102
}
@@ -5118,7 +5118,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5118
5118
5119
5119
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: BroadcastChannelAnnouncement {
5120
5120
msg : try_chan_entry ! ( self , chan. get_mut( ) . announcement_signatures(
5121
- self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , channel_state , chan) ,
5121
+ self . get_our_node_id( ) , self . genesis_hash. clone( ) , self . best_block. read( ) . unwrap( ) . height( ) , msg) , chan) ,
5122
5122
// Note that announcement_signatures fails if the channel cannot be announced,
5123
5123
// so get_channel_update_for_broadcast will never fail by the time we get here.
5124
5124
update_msg : self . get_channel_update_for_broadcast ( chan. get ( ) ) . unwrap ( ) ,
@@ -5156,7 +5156,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5156
5156
if were_node_one == msg_from_node_one {
5157
5157
return Ok ( NotifyOption :: SkipPersist ) ;
5158
5158
} else {
5159
- try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , channel_state , chan) ;
5159
+ try_chan_entry ! ( self , chan. get_mut( ) . channel_update( & msg) , chan) ;
5160
5160
}
5161
5161
} ,
5162
5162
hash_map:: Entry :: Vacant ( _) => unreachable ! ( )
@@ -5181,7 +5181,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5181
5181
// add-HTLCs on disconnect, we may be handed HTLCs to fail backwards here.
5182
5182
let responses = try_chan_entry ! ( self , chan. get_mut( ) . channel_reestablish(
5183
5183
msg, & self . logger, self . our_network_pubkey. clone( ) , self . genesis_hash,
5184
- & * self . best_block. read( ) . unwrap( ) ) , channel_state , chan) ;
5184
+ & * self . best_block. read( ) . unwrap( ) ) , chan) ;
5185
5185
let mut channel_update = None ;
5186
5186
if let Some ( msg) = responses. shutdown_msg {
5187
5187
channel_state. pending_msg_events . push ( events:: MessageSendEvent :: SendShutdown {
@@ -5245,7 +5245,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
5245
5245
let by_id = & mut channel_state. by_id ;
5246
5246
let pending_msg_events = & mut channel_state. pending_msg_events ;
5247
5247
if let hash_map:: Entry :: Occupied ( chan_entry) = by_id. entry ( funding_outpoint. to_channel_id ( ) ) {
5248
- let mut chan = remove_channel ! ( self , channel_state , chan_entry) ;
5248
+ let mut chan = remove_channel ! ( self , chan_entry) ;
5249
5249
failed_channels. push ( chan. force_shutdown ( false ) ) ;
5250
5250
if let Ok ( update) = self . get_channel_update_for_broadcast ( & chan) {
5251
5251
pending_msg_events. push ( events:: MessageSendEvent :: BroadcastChannelUpdate {
0 commit comments