@@ -1814,7 +1814,7 @@ macro_rules! emit_channel_ready_event {
1814
1814
}
1815
1815
1816
1816
macro_rules! handle_monitor_update_completion {
1817
- ( $self: ident, $update_id : expr , $ peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
1817
+ ( $self: ident, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
1818
1818
let mut updates = $chan. monitor_updating_restored( & $self. logger,
1819
1819
& $self. node_signer, $self. genesis_hash, & $self. default_configuration,
1820
1820
$self. best_block. read( ) . unwrap( ) . height( ) ) ;
@@ -1893,16 +1893,15 @@ macro_rules! handle_new_monitor_update {
1893
1893
} ,
1894
1894
}
1895
1895
} } ;
1896
- ( $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) => {
1896
+ ( $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) => {
1897
1897
handle_new_monitor_update!( $self, $update_res, $peer_state_lock, $peer_state,
1898
1898
$per_peer_state_lock, $chan, _internal, $remove,
1899
- handle_monitor_update_completion!( $self, $update_id , $ peer_state_lock, $peer_state, $per_peer_state_lock, $chan) )
1899
+ handle_monitor_update_completion!( $self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) )
1900
1900
} ;
1901
- ( $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 ) => {
1902
- 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( ) )
1901
+ ( $self: ident, $update_res: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan_entry: expr, INITIAL_MONITOR ) => {
1902
+ 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( ) )
1903
1903
} ;
1904
1904
( $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) => { {
1905
- let update_id = $update. update_id;
1906
1905
let in_flight_updates = $peer_state. in_flight_monitor_updates. entry( $funding_txo)
1907
1906
. or_insert_with( Vec :: new) ;
1908
1907
in_flight_updates. push( $update) ;
@@ -1912,7 +1911,7 @@ macro_rules! handle_new_monitor_update {
1912
1911
{
1913
1912
in_flight_updates. pop( ) ;
1914
1913
if in_flight_updates. is_empty( ) && $chan. blocked_monitor_updates_pending( ) == 0 {
1915
- handle_monitor_update_completion!( $self, update_id , $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
1914
+ handle_monitor_update_completion!( $self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
1916
1915
}
1917
1916
} )
1918
1917
} } ;
@@ -4862,7 +4861,7 @@ where
4862
4861
if !channel. get ( ) . is_awaiting_monitor_update ( ) || channel. get ( ) . context . get_latest_monitor_update_id ( ) != highest_applied_update_id {
4863
4862
return ;
4864
4863
}
4865
- handle_monitor_update_completion ! ( self , highest_applied_update_id , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
4864
+ handle_monitor_update_completion ! ( self , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
4866
4865
}
4867
4866
4868
4867
/// Accepts a request to open a channel after a [`Event::OpenChannelRequest`].
@@ -5185,7 +5184,7 @@ where
5185
5184
let monitor_res = self . chain_monitor . watch_channel ( monitor. get_funding_txo ( ) . 0 , monitor) ;
5186
5185
5187
5186
let chan = e. insert ( chan) ;
5188
- let mut res = handle_new_monitor_update ! ( self , monitor_res, 0 , peer_state_lock, peer_state,
5187
+ let mut res = handle_new_monitor_update ! ( self , monitor_res, peer_state_lock, peer_state,
5189
5188
per_peer_state, chan, MANUALLY_REMOVING_INITIAL_MONITOR ,
5190
5189
{ peer_state. channel_by_id. remove( & new_channel_id) } ) ;
5191
5190
@@ -5220,7 +5219,7 @@ where
5220
5219
let monitor = try_chan_entry ! ( self ,
5221
5220
chan. get_mut( ) . funding_signed( & msg, best_block, & self . signer_provider, & self . logger) , chan) ;
5222
5221
let update_res = self . chain_monitor . watch_channel ( chan. get ( ) . context . get_funding_txo ( ) . unwrap ( ) , monitor) ;
5223
- let mut res = handle_new_monitor_update ! ( self , update_res, 0 , peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
5222
+ let mut res = handle_new_monitor_update ! ( self , update_res, peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
5224
5223
if let Err ( MsgHandleErrInternal { ref mut shutdown_finish, .. } ) = res {
5225
5224
// We weren't able to watch the channel to begin with, so no updates should be made on
5226
5225
// it. Previously, full_stack_target found an (unreachable) panic when the
0 commit comments