@@ -1819,7 +1819,7 @@ macro_rules! emit_channel_ready_event {
18191819}
18201820
18211821macro_rules! handle_monitor_update_completion {
1822- ( $self: ident, $update_id : expr , $ peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
1822+ ( $self: ident, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
18231823 let mut updates = $chan. monitor_updating_restored( & $self. logger,
18241824 & $self. node_signer, $self. genesis_hash, & $self. default_configuration,
18251825 $self. best_block. read( ) . unwrap( ) . height( ) ) ;
@@ -1898,16 +1898,15 @@ macro_rules! handle_new_monitor_update {
18981898 } ,
18991899 }
19001900 } } ;
1901- ( $self: ident, $update_res: expr, $update_id : expr , $ peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr, MANUALLY_REMOVING_INITIAL_MONITOR , $remove: expr) => {
1901+ ( $self: ident, $update_res: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr, MANUALLY_REMOVING_INITIAL_MONITOR , $remove: expr) => {
19021902 handle_new_monitor_update!( $self, $update_res, $peer_state_lock, $peer_state,
19031903 $per_peer_state_lock, $chan, _internal, $remove,
1904- handle_monitor_update_completion!( $self, $update_id , $ peer_state_lock, $peer_state, $per_peer_state_lock, $chan) )
1904+ handle_monitor_update_completion!( $self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) )
19051905 } ;
1906- ( $self: ident, $update_res: expr, $update_id : expr , $ peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan_entry: expr, INITIAL_MONITOR ) => {
1907- handle_new_monitor_update!( $self, $update_res, $update_id , $ peer_state_lock, $peer_state, $per_peer_state_lock, $chan_entry. get_mut( ) , MANUALLY_REMOVING_INITIAL_MONITOR , $chan_entry. remove_entry( ) )
1906+ ( $self: ident, $update_res: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan_entry: expr, INITIAL_MONITOR ) => {
1907+ handle_new_monitor_update!( $self, $update_res, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan_entry. get_mut( ) , MANUALLY_REMOVING_INITIAL_MONITOR , $chan_entry. remove_entry( ) )
19081908 } ;
19091909 ( $self: ident, $funding_txo: expr, $update: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr, MANUALLY_REMOVING , $remove: expr) => { {
1910- let update_id = $update. update_id;
19111910 let in_flight_updates = $peer_state. in_flight_monitor_updates. entry( $funding_txo)
19121911 . or_insert_with( Vec :: new) ;
19131912 if !in_flight_updates. contains( & $update) {
@@ -1922,7 +1921,7 @@ macro_rules! handle_new_monitor_update {
19221921 {
19231922 in_flight_updates. pop( ) ;
19241923 if in_flight_updates. is_empty( ) && $chan. blocked_monitor_updates_pending( ) == 0 {
1925- handle_monitor_update_completion!( $self, update_id , $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
1924+ handle_monitor_update_completion!( $self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
19261925 }
19271926 } )
19281927 } } ;
@@ -4932,7 +4931,7 @@ where
49324931 if !channel. get ( ) . is_awaiting_monitor_update ( ) || channel. get ( ) . context . get_latest_monitor_update_id ( ) != highest_applied_update_id {
49334932 return ;
49344933 }
4935- handle_monitor_update_completion ! ( self , highest_applied_update_id , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
4934+ handle_monitor_update_completion ! ( self , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
49364935 }
49374936
49384937 /// Accepts a request to open a channel after a [`Event::OpenChannelRequest`].
@@ -5255,7 +5254,7 @@ where
52555254 let monitor_res = self . chain_monitor . watch_channel ( monitor. get_funding_txo ( ) . 0 , monitor) ;
52565255
52575256 let chan = e. insert ( chan) ;
5258- let mut res = handle_new_monitor_update ! ( self , monitor_res, 0 , peer_state_lock, peer_state,
5257+ let mut res = handle_new_monitor_update ! ( self , monitor_res, peer_state_lock, peer_state,
52595258 per_peer_state, chan, MANUALLY_REMOVING_INITIAL_MONITOR ,
52605259 { peer_state. channel_by_id. remove( & new_channel_id) } ) ;
52615260
@@ -5290,7 +5289,7 @@ where
52905289 let monitor = try_chan_entry ! ( self ,
52915290 chan. get_mut( ) . funding_signed( & msg, best_block, & self . signer_provider, & self . logger) , chan) ;
52925291 let update_res = self . chain_monitor . watch_channel ( chan. get ( ) . context . get_funding_txo ( ) . unwrap ( ) , monitor) ;
5293- let mut res = handle_new_monitor_update ! ( self , update_res, 0 , peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
5292+ let mut res = handle_new_monitor_update ! ( self , update_res, peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
52945293 if let Err ( MsgHandleErrInternal { ref mut shutdown_finish, .. } ) = res {
52955294 // We weren't able to watch the channel to begin with, so no updates should be made on
52965295 // it. Previously, full_stack_target found an (unreachable) panic when the
0 commit comments