@@ -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
if !in_flight_updates. contains( & $update) {
@@ -1917,7 +1916,7 @@ macro_rules! handle_new_monitor_update {
1917
1916
{
1918
1917
in_flight_updates. pop( ) ;
1919
1918
if in_flight_updates. is_empty( ) && $chan. blocked_monitor_updates_pending( ) == 0 {
1920
- handle_monitor_update_completion!( $self, update_id , $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
1919
+ handle_monitor_update_completion!( $self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan) ;
1921
1920
}
1922
1921
} )
1923
1922
} } ;
@@ -4868,7 +4867,7 @@ where
4868
4867
if !channel. get ( ) . is_awaiting_monitor_update ( ) || channel. get ( ) . context . get_latest_monitor_update_id ( ) != highest_applied_update_id {
4869
4868
return ;
4870
4869
}
4871
- handle_monitor_update_completion ! ( self , highest_applied_update_id , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
4870
+ handle_monitor_update_completion ! ( self , peer_state_lock, peer_state, per_peer_state, channel. get_mut( ) ) ;
4872
4871
}
4873
4872
4874
4873
/// Accepts a request to open a channel after a [`Event::OpenChannelRequest`].
@@ -5191,7 +5190,7 @@ where
5191
5190
let monitor_res = self . chain_monitor . watch_channel ( monitor. get_funding_txo ( ) . 0 , monitor) ;
5192
5191
5193
5192
let chan = e. insert ( chan) ;
5194
- let mut res = handle_new_monitor_update ! ( self , monitor_res, 0 , peer_state_lock, peer_state,
5193
+ let mut res = handle_new_monitor_update ! ( self , monitor_res, peer_state_lock, peer_state,
5195
5194
per_peer_state, chan, MANUALLY_REMOVING_INITIAL_MONITOR ,
5196
5195
{ peer_state. channel_by_id. remove( & new_channel_id) } ) ;
5197
5196
@@ -5226,7 +5225,7 @@ where
5226
5225
let monitor = try_chan_entry ! ( self ,
5227
5226
chan. get_mut( ) . funding_signed( & msg, best_block, & self . signer_provider, & self . logger) , chan) ;
5228
5227
let update_res = self . chain_monitor . watch_channel ( chan. get ( ) . context . get_funding_txo ( ) . unwrap ( ) , monitor) ;
5229
- let mut res = handle_new_monitor_update ! ( self , update_res, 0 , peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
5228
+ let mut res = handle_new_monitor_update ! ( self , update_res, peer_state_lock, peer_state, per_peer_state, chan, INITIAL_MONITOR ) ;
5230
5229
if let Err ( MsgHandleErrInternal { ref mut shutdown_finish, .. } ) = res {
5231
5230
// We weren't able to watch the channel to begin with, so no updates should be made on
5232
5231
// it. Previously, full_stack_target found an (unreachable) panic when the
0 commit comments