@@ -3628,8 +3628,8 @@ macro_rules! handle_monitor_update_completion {
3628
3628
} }
3629
3629
}
3630
3630
3631
- macro_rules! handle_new_monitor_update {
3632
- ($self: ident, $update_res: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr, INITIAL_MONITOR ) => {
3631
+ macro_rules! handle_initial_monitor {
3632
+ ($self: ident, $update_res: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => {
3633
3633
let logger = WithChannelContext::from(&$self.logger, &$chan.context, None);
3634
3634
let update_completed =
3635
3635
$self.handle_monitor_update_res($update_res, $chan.context.channel_id(), logger);
@@ -3643,6 +3643,9 @@ macro_rules! handle_new_monitor_update {
3643
3643
);
3644
3644
}
3645
3645
};
3646
+ }
3647
+
3648
+ macro_rules! handle_new_monitor_update {
3646
3649
(
3647
3650
$self: ident, $funding_txo: expr, $update: expr, $peer_state: expr, $logger: expr,
3648
3651
$chan_id: expr, $counterparty_node_id: expr, $in_flight_updates: ident, $update_idx: ident,
@@ -10115,8 +10118,8 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
10115
10118
}
10116
10119
10117
10120
if let Some(funded_chan) = e.insert(Channel::from(chan)).as_funded_mut() {
10118
- handle_new_monitor_update !(self, persist_state, peer_state_lock, peer_state,
10119
- per_peer_state, funded_chan, INITIAL_MONITOR );
10121
+ handle_initial_monitor !(self, persist_state, peer_state_lock, peer_state,
10122
+ per_peer_state, funded_chan);
10120
10123
} else {
10121
10124
unreachable!("This must be a funded channel as we just inserted it.");
10122
10125
}
@@ -10279,7 +10282,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
10279
10282
})
10280
10283
{
10281
10284
Ok((funded_chan, persist_status)) => {
10282
- handle_new_monitor_update !(self, persist_status, peer_state_lock, peer_state, per_peer_state, funded_chan, INITIAL_MONITOR );
10285
+ handle_initial_monitor !(self, persist_status, peer_state_lock, peer_state, per_peer_state, funded_chan);
10283
10286
Ok(())
10284
10287
},
10285
10288
Err(e) => try_channel_entry!(self, peer_state, Err(e), chan_entry),
@@ -10904,8 +10907,8 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
10904
10907
if let Some(monitor) = monitor_opt {
10905
10908
let monitor_res = self.chain_monitor.watch_channel(monitor.channel_id(), monitor);
10906
10909
if let Ok(persist_state) = monitor_res {
10907
- handle_new_monitor_update !(self, persist_state, peer_state_lock, peer_state,
10908
- per_peer_state, chan, INITIAL_MONITOR );
10910
+ handle_initial_monitor !(self, persist_state, peer_state_lock, peer_state,
10911
+ per_peer_state, chan);
10909
10912
} else {
10910
10913
let logger = WithChannelContext::from(&self.logger, &chan.context, None);
10911
10914
log_error!(logger, "Persisting initial ChannelMonitor failed, implying the channel ID was duplicated");
0 commit comments