@@ -1636,9 +1636,6 @@ pub struct ChannelDetails {
16361636 pub counterparty: ChannelCounterparty,
16371637 /// The Channel's funding transaction output, if we've negotiated the funding transaction with
16381638 /// our counterparty already.
1639- ///
1640- /// Note that, if this has been set, `channel_id` for V1-established channels will be equivalent to
1641- /// `ChannelId::v1_from_funding_outpoint(funding_txo.unwrap())`.
16421639 pub funding_txo: Option<OutPoint>,
16431640 /// The features which this channel operates with. See individual features for more info.
16441641 ///
@@ -2296,7 +2293,7 @@ macro_rules! handle_new_monitor_update {
22962293 handle_new_monitor_update!($self, $update_res, $chan, _internal,
22972294 handle_monitor_update_completion!($self, $peer_state_lock, $peer_state, $per_peer_state_lock, $chan))
22982295 };
2299- ($self: ident, $funding_txo: expr, $channel_id: expr, $ update: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
2296+ ($self: ident, $funding_txo: expr, $update: expr, $peer_state_lock: expr, $peer_state: expr, $per_peer_state_lock: expr, $chan: expr) => { {
23002297 let in_flight_updates = $peer_state.in_flight_monitor_updates.entry($funding_txo)
23012298 .or_insert_with(Vec::new);
23022299 // During startup, we push monitor updates as background events through to here in
@@ -2753,7 +2750,7 @@ where
27532750
27542751 // Update the monitor with the shutdown script if necessary.
27552752 if let Some(monitor_update) = monitor_update_opt.take() {
2756- handle_new_monitor_update!(self, funding_txo_opt.unwrap(), *channel_id, monitor_update,
2753+ handle_new_monitor_update!(self, funding_txo_opt.unwrap(), monitor_update,
27572754 peer_state_lock, peer_state, per_peer_state, chan);
27582755 }
27592756 } else {
@@ -3414,7 +3411,7 @@ where
34143411 }, onion_packet, None, &self.fee_estimator, &&logger);
34153412 match break_chan_phase_entry!(self, send_res, chan_phase_entry) {
34163413 Some(monitor_update) => {
3417- match handle_new_monitor_update!(self, funding_txo, channel_id, monitor_update, peer_state_lock, peer_state, per_peer_state, chan) {
3414+ match handle_new_monitor_update!(self, funding_txo, monitor_update, peer_state_lock, peer_state, per_peer_state, chan) {
34183415 false => {
34193416 // Note that MonitorUpdateInProgress here indicates (per function
34203417 // docs) that we will resend the commitment update once monitor
@@ -4770,7 +4767,7 @@ where
47704767 hash_map::Entry::Occupied(mut chan_phase) => {
47714768 if let ChannelPhase::Funded(chan) = chan_phase.get_mut() {
47724769 updated_chan = true;
4773- handle_new_monitor_update!(self, funding_txo, channel_id, update.clone(),
4770+ handle_new_monitor_update!(self, funding_txo, update.clone(),
47744771 peer_state_lock, peer_state, per_peer_state, chan);
47754772 } else {
47764773 debug_assert!(false, "We shouldn't have an update for a non-funded channel");
@@ -5574,7 +5571,7 @@ where
55745571 peer_state.monitor_update_blocked_actions.entry(chan_id).or_insert(Vec::new()).push(action);
55755572 }
55765573 if !during_init {
5577- handle_new_monitor_update!(self, prev_hop.outpoint, prev_hop.channel_id, monitor_update, peer_state_lock,
5574+ handle_new_monitor_update!(self, prev_hop.outpoint, monitor_update, peer_state_lock,
55785575 peer_state, per_peer_state, chan);
55795576 } else {
55805577 // If we're running during init we cannot update a monitor directly -
@@ -6570,7 +6567,7 @@ where
65706567 }
65716568 // Update the monitor with the shutdown script if necessary.
65726569 if let Some(monitor_update) = monitor_update_opt {
6573- handle_new_monitor_update!(self, funding_txo_opt.unwrap(), chan.context.channel_id(), monitor_update,
6570+ handle_new_monitor_update!(self, funding_txo_opt.unwrap(), monitor_update,
65746571 peer_state_lock, peer_state, per_peer_state, chan);
65756572 }
65766573 },
@@ -6852,7 +6849,7 @@ where
68526849 let funding_txo = chan.context.get_funding_txo();
68536850 let monitor_update_opt = try_chan_phase_entry!(self, chan.commitment_signed(&msg, &&logger), chan_phase_entry);
68546851 if let Some(monitor_update) = monitor_update_opt {
6855- handle_new_monitor_update!(self, funding_txo.unwrap(), chan.context.channel_id(), monitor_update, peer_state_lock,
6852+ handle_new_monitor_update!(self, funding_txo.unwrap(), monitor_update, peer_state_lock,
68566853 peer_state, per_peer_state, chan);
68576854 }
68586855 Ok(())
@@ -7031,7 +7028,7 @@ where
70317028 if let Some(monitor_update) = monitor_update_opt {
70327029 let funding_txo = funding_txo_opt
70337030 .expect("Funding outpoint must have been set for RAA handling to succeed");
7034- handle_new_monitor_update!(self, funding_txo, chan.context.channel_id(), monitor_update,
7031+ handle_new_monitor_update!(self, funding_txo, monitor_update,
70357032 peer_state_lock, peer_state, per_peer_state, chan);
70367033 }
70377034 htlcs_to_fail
@@ -7372,7 +7369,7 @@ where
73727369 if let Some(monitor_update) = monitor_opt {
73737370 has_monitor_update = true;
73747371
7375- handle_new_monitor_update!(self, funding_txo.unwrap(), chan.context.channel_id(), monitor_update,
7372+ handle_new_monitor_update!(self, funding_txo.unwrap(), monitor_update,
73767373 peer_state_lock, peer_state, per_peer_state, chan);
73777374 continue 'peer_loop;
73787375 }
@@ -8141,7 +8138,7 @@ where
81418138 if let Some((monitor_update, further_update_exists)) = chan.unblock_next_blocked_monitor_update() {
81428139 log_debug!(logger, "Unlocking monitor updating for channel {} and updating monitor",
81438140 channel_id);
8144- handle_new_monitor_update!(self, channel_funding_outpoint, channel_id, monitor_update,
8141+ handle_new_monitor_update!(self, channel_funding_outpoint, monitor_update,
81458142 peer_state_lck, peer_state, per_peer_state, chan);
81468143 if further_update_exists {
81478144 // If there are more `ChannelMonitorUpdate`s to process, restart at the
@@ -9816,7 +9813,7 @@ impl_writeable_tlv_based!(PendingAddHTLCInfo, {
98169813 (2, prev_short_channel_id, required),
98179814 (4, prev_htlc_id, required),
98189815 (6, prev_funding_outpoint, required),
9819- // Note that by the time we get past the required read for type 2 above, prev_funding_outpoint will be
9816+ // Note that by the time we get past the required read for type 6 above, prev_funding_outpoint will be
98209817 // filled in, so we can safely unwrap it here.
98219818 (7, prev_channel_id, (default_value, ChannelId::v1_from_funding_outpoint(prev_funding_outpoint.0.unwrap()))),
98229819});
@@ -11079,12 +11076,11 @@ where
1107911076 Some((blocked_node_id, _blocked_channel_outpoint, blocked_channel_id, blocking_action)), ..
1108011077 } = action {
1108111078 if let Some(blocked_peer_state) = per_peer_state.get(&blocked_node_id) {
11082- let channel_id = blocked_channel_id;
1108311079 log_trace!(logger,
1108411080 "Holding the next revoke_and_ack from {} until the preimage is durably persisted in the inbound edge's ChannelMonitor",
11085- channel_id );
11081+ blocked_channel_id );
1108611082 blocked_peer_state.lock().unwrap().actions_blocking_raa_monitor_updates
11087- .entry(*channel_id )
11083+ .entry(*blocked_channel_id )
1108811084 .or_insert_with(Vec::new).push(blocking_action.clone());
1108911085 } else {
1109011086 // If the channel we were blocking has closed, we don't need to
0 commit comments