@@ -2153,7 +2153,7 @@ where
21532153 // Not having a signing session implies they've already sent `splice_locked`,
21542154 // which must always come after the initial commitment signed is sent.
21552155 .unwrap_or(true);
2156- let res = if has_negotiated_pending_splice && !session_received_commitment_signed {
2156+ let res: Result<(Option<ChannelMonitor<<<SP as Deref>::Target as SignerProvider>::EcdsaSigner>>, Option<ChannelMonitorUpdate>), ChannelError> = if has_negotiated_pending_splice && !session_received_commitment_signed {
21572157 funded_channel
21582158 .splice_initial_commitment_signed(msg, fee_estimator, logger)
21592159 .map(|monitor_update_opt| (None, monitor_update_opt))
@@ -6045,6 +6045,7 @@ where
60456045 should_broadcast: broadcast,
60466046 }],
60476047 channel_id: Some(self.channel_id()),
6048+ encoded_channel: None,
60486049 };
60496050 Some((self.get_counterparty_node_id(), funding_txo, self.channel_id(), update))
60506051 } else {
@@ -7276,6 +7277,7 @@ where
72767277 payment_info,
72777278 }],
72787279 channel_id: Some(self.context.channel_id()),
7280+ encoded_channel: None,
72797281 };
72807282
72817283 if !self.context.channel_state.can_generate_new_commitment() {
@@ -7417,6 +7419,7 @@ where
74177419 Vec::new(),
74187420 Vec::new(),
74197421 );
7422+ monitor_update.encoded_channel = Some(self.encode());
74207423 UpdateFulfillCommitFetch::NewClaim { monitor_update, htlc_value_msat }
74217424 },
74227425 UpdateFulfillFetch::DuplicateClaim {} => UpdateFulfillCommitFetch::DuplicateClaim {},
@@ -7892,14 +7895,15 @@ where
78927895 &self.context.channel_id(), pending_splice_funding.get_funding_txo().unwrap().txid);
78937896
78947897 self.context.latest_monitor_update_id += 1;
7895- let monitor_update = ChannelMonitorUpdate {
7898+ let mut monitor_update = ChannelMonitorUpdate {
78967899 update_id: self.context.latest_monitor_update_id,
78977900 updates: vec![ChannelMonitorUpdateStep::RenegotiatedFunding {
78987901 channel_parameters: pending_splice_funding.channel_transaction_parameters.clone(),
78997902 holder_commitment_tx,
79007903 counterparty_commitment_tx,
79017904 }],
79027905 channel_id: Some(self.context.channel_id()),
7906+ encoded_channel: None,
79037907 };
79047908
79057909 self.context
@@ -7909,6 +7913,7 @@ where
79097913 .received_commitment_signed();
79107914 self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
79117915
7916+ monitor_update.encoded_channel = Some(self.encode());
79127917 Ok(self.push_ret_blockable_mon_update(monitor_update))
79137918 }
79147919
@@ -8165,6 +8170,7 @@ where
81658170 update_id: self.context.latest_monitor_update_id,
81668171 updates: vec![update],
81678172 channel_id: Some(self.context.channel_id()),
8173+ encoded_channel: None,
81688174 };
81698175
81708176 self.context.expecting_peer_commitment_signed = false;
@@ -8217,6 +8223,7 @@ where
82178223 Vec::new(),
82188224 Vec::new(),
82198225 );
8226+ monitor_update.encoded_channel = Some(self.encode());
82208227 return Ok(self.push_ret_blockable_mon_update(monitor_update));
82218228 }
82228229
@@ -8270,6 +8277,7 @@ where
82708277 update_id: self.context.latest_monitor_update_id + 1, // We don't increment this yet!
82718278 updates: Vec::new(),
82728279 channel_id: Some(self.context.channel_id()),
8280+ encoded_channel: None,
82738281 };
82748282
82758283 let mut htlc_updates = Vec::new();
@@ -8346,7 +8354,7 @@ where
83468354 // `ChannelMonitorUpdate` to the user, making this one redundant, however
83478355 // there's no harm in including the extra `ChannelMonitorUpdateStep` here.
83488356 // We do not bother to track and include `payment_info` here, however.
8349- let fulfill = self.get_update_fulfill_htlc(
8357+ let fulfill: UpdateFulfillFetch = self.get_update_fulfill_htlc(
83508358 htlc_id,
83518359 *payment_preimage,
83528360 None,
@@ -8360,6 +8368,8 @@ where
83608368 unreachable!()
83618369 };
83628370 update_fulfill_count += 1;
8371+
8372+ additional_monitor_update.encoded_channel = Some(self.encode());
83638373 monitor_update.updates.append(&mut additional_monitor_update.updates);
83648374 None
83658375 },
@@ -8418,6 +8428,8 @@ where
84188428 update_add_count, update_fulfill_count, update_fail_count);
84198429
84208430 self.monitor_updating_paused(false, true, false, Vec::new(), Vec::new(), Vec::new());
8431+
8432+ monitor_update.encoded_channel = Some(self.encode());
84218433 (self.push_ret_blockable_mon_update(monitor_update), htlcs_to_fail)
84228434 } else {
84238435 (None, Vec::new())
@@ -8534,6 +8546,7 @@ where
85348546 secret: msg.per_commitment_secret,
85358547 }],
85368548 channel_id: Some(self.context.channel_id()),
8549+ encoded_channel: None,
85378550 };
85388551
85398552 // Update state now that we've passed all the can-fail calls...
@@ -8759,6 +8772,7 @@ where
87598772 };
87608773 macro_rules! return_with_htlcs_to_fail {
87618774 ($htlcs_to_fail: expr) => {
8775+ monitor_update.encoded_channel = Some(self.encode());
87628776 if !release_monitor {
87638777 self.context
87648778 .blocked_monitor_updates
@@ -10384,6 +10398,7 @@ where
1038410398 scriptpubkey: self.get_closing_scriptpubkey(),
1038510399 }],
1038610400 channel_id: Some(self.context.channel_id()),
10401+ encoded_channel: Some(self.encode()),
1038710402 };
1038810403 self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
1038910404 self.push_ret_blockable_mon_update(monitor_update)
@@ -11153,6 +11168,7 @@ where
1115311168 funding_txid: funding_txo.txid,
1115411169 }],
1115511170 channel_id: Some(self.context.channel_id()),
11171+ encoded_channel: Some(self.encode()),
1115611172 };
1115711173 self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
1115811174 let monitor_update = self.push_ret_blockable_mon_update(monitor_update);
@@ -12712,6 +12728,7 @@ where
1271212728 update_id: self.context.latest_monitor_update_id,
1271312729 updates: vec![update],
1271412730 channel_id: Some(self.context.channel_id()),
12731+ encoded_channel: Some(self.encode()),
1271512732 };
1271612733 self.context.channel_state.set_awaiting_remote_revoke();
1271712734 monitor_update
@@ -12958,6 +12975,7 @@ where
1295812975 scriptpubkey: self.get_closing_scriptpubkey(),
1295912976 }],
1296012977 channel_id: Some(self.context.channel_id()),
12978+ encoded_channel: Some(self.encode()),
1296112979 };
1296212980 self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
1296312981 self.push_ret_blockable_mon_update(monitor_update)
0 commit comments