@@ -2188,7 +2188,6 @@ impl PendingSplice {
21882188 },
21892189 }
21902190 }
2191-
21922191}
21932192
21942193/// Wrapper around a [`Transaction`] useful for caching the result of [`Transaction::compute_txid`].
@@ -9279,12 +9278,18 @@ where
92799278 &self.context.channel_id,
92809279 );
92819280
9282- let announcement_sigs = self
9283- .maybe_promote_splice_funding(confirmed_funding_index, logger)
9281+ let funding_promoted =
9282+ self.maybe_promote_splice_funding(confirmed_funding_index, logger);
9283+ let funding_txo = funding_promoted.then(|| {
9284+ self.funding
9285+ .get_funding_txo()
9286+ .expect("Splice FundingScope should always have a funding_txo")
9287+ });
9288+ let announcement_sigs = funding_promoted
92849289 .then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
92859290 .flatten();
92869291
9287- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), announcement_sigs));
9292+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), announcement_sigs));
92889293 }
92899294 }
92909295
@@ -9442,16 +9447,22 @@ where
94429447 if let Some(splice_locked) = pending_splice.check_get_splice_locked(&self.context, funding, height) {
94439448 log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
94449449
9445- let announcement_sigs = self
9446- .maybe_promote_splice_funding(confirmed_funding_index, logger)
9450+ let funding_promoted =
9451+ self.maybe_promote_splice_funding(confirmed_funding_index, logger);
9452+ let funding_txo = funding_promoted.then(|| {
9453+ self.funding
9454+ .get_funding_txo()
9455+ .expect("Splice FundingScope should always have a funding_txo")
9456+ });
9457+ let announcement_sigs = funding_promoted
94479458 .then(|| chain_node_signer
94489459 .and_then(|(chain_hash, node_signer, user_config)|
94499460 self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)
94509461 )
94519462 )
94529463 .flatten();
94539464
9454- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), timed_out_htlcs, announcement_sigs));
9465+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), timed_out_htlcs, announcement_sigs));
94559466 }
94569467 }
94579468
@@ -9945,7 +9956,7 @@ where
99459956 pub fn splice_locked<NS: Deref, L: Deref>(
99469957 &mut self, msg: &msgs::SpliceLocked, node_signer: &NS, chain_hash: ChainHash,
99479958 user_config: &UserConfig, best_block: &BestBlock, logger: &L,
9948- ) -> Result<Option<msgs::AnnouncementSignatures>, ChannelError>
9959+ ) -> Result<( Option<OutPoint>, Option< msgs::AnnouncementSignatures>) , ChannelError>
99499960 where
99509961 NS::Target: NodeSigner,
99519962 L::Target: Logger,
@@ -9978,13 +9989,18 @@ where
99789989 &self.context.channel_id,
99799990 );
99809991 promote_splice_funding!(self, funding);
9981- return Ok(self.get_announcement_sigs(
9992+ let funding_txo = self
9993+ .funding
9994+ .get_funding_txo()
9995+ .expect("Splice FundingScope should always have a funding_txo");
9996+ let announcement_sigs = self.get_announcement_sigs(
99829997 node_signer,
99839998 chain_hash,
99849999 user_config,
998510000 best_block.height,
998610001 logger,
9987- ));
10002+ );
10003+ return Ok((Some(funding_txo), announcement_sigs));
998810004 }
998910005
999010006 let err = "unknown splice funding txid";
@@ -10008,7 +10024,7 @@ where
1000810024 }
1000910025
1001010026 pending_splice.received_funding_txid = Some(msg.splice_txid);
10011- Ok(None)
10027+ Ok(( None, None) )
1001210028 }
1001310029
1001410030 // Send stuff to our remote peers:
@@ -10735,11 +10751,6 @@ where
1073510751 }
1073610752 }
1073710753
10738- #[cfg(splicing)]
10739- pub fn has_pending_splice(&self) -> bool {
10740- self.pending_splice.is_some()
10741- }
10742-
1074310754 pub fn remove_legacy_scids_before_block(&mut self, height: u32) -> alloc::vec::Drain<u64> {
1074410755 let end = self
1074510756 .funding
0 commit comments