@@ -9279,12 +9279,16 @@ where
9279
9279
&self.context.channel_id,
9280
9280
);
9281
9281
9282
- let announcement_sigs = self
9283
- .maybe_promote_splice_funding(confirmed_funding_index, logger)
9282
+ let funding_promoted =
9283
+ self.maybe_promote_splice_funding(confirmed_funding_index, logger);
9284
+ let funding_txo = funding_promoted
9285
+ .then(|| self.funding.get_funding_txo())
9286
+ .flatten();
9287
+ let announcement_sigs = funding_promoted
9284
9288
.then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
9285
9289
.flatten();
9286
9290
9287
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), announcement_sigs));
9291
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), announcement_sigs));
9288
9292
}
9289
9293
}
9290
9294
@@ -9442,16 +9446,20 @@ where
9442
9446
if let Some(splice_locked) = pending_splice.check_get_splice_locked(&self.context, funding, height) {
9443
9447
log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
9444
9448
9445
- let announcement_sigs = self
9446
- .maybe_promote_splice_funding(confirmed_funding_index, logger)
9449
+ let funding_promoted =
9450
+ self.maybe_promote_splice_funding(confirmed_funding_index, logger);
9451
+ let funding_txo = funding_promoted
9452
+ .then(|| self.funding.get_funding_txo())
9453
+ .flatten();
9454
+ let announcement_sigs = funding_promoted
9447
9455
.then(|| chain_node_signer
9448
9456
.and_then(|(chain_hash, node_signer, user_config)|
9449
9457
self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)
9450
9458
)
9451
9459
)
9452
9460
.flatten();
9453
9461
9454
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), timed_out_htlcs, announcement_sigs));
9462
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), timed_out_htlcs, announcement_sigs));
9455
9463
}
9456
9464
}
9457
9465
@@ -9945,7 +9953,7 @@ where
9945
9953
pub fn splice_locked<NS: Deref, L: Deref>(
9946
9954
&mut self, msg: &msgs::SpliceLocked, node_signer: &NS, chain_hash: ChainHash,
9947
9955
user_config: &UserConfig, best_block: &BestBlock, logger: &L,
9948
- ) -> Result<Option<msgs::AnnouncementSignatures>, ChannelError>
9956
+ ) -> Result<( Option<OutPoint>, Option< msgs::AnnouncementSignatures>) , ChannelError>
9949
9957
where
9950
9958
NS::Target: NodeSigner,
9951
9959
L::Target: Logger,
@@ -9978,13 +9986,15 @@ where
9978
9986
&self.context.channel_id,
9979
9987
);
9980
9988
promote_splice_funding!(self, funding);
9981
- return Ok(self.get_announcement_sigs(
9989
+ let funding_txo = self.funding.get_funding_txo();
9990
+ let announcement_sigs = self.get_announcement_sigs(
9982
9991
node_signer,
9983
9992
chain_hash,
9984
9993
user_config,
9985
9994
best_block.height,
9986
9995
logger,
9987
- ));
9996
+ );
9997
+ return Ok((funding_txo, announcement_sigs));
9988
9998
}
9989
9999
9990
10000
let err = "unknown splice funding txid";
@@ -10008,7 +10018,7 @@ where
10008
10018
}
10009
10019
10010
10020
pending_splice.received_funding_txid = Some(msg.splice_txid);
10011
- Ok(None)
10021
+ Ok(( None, None) )
10012
10022
}
10013
10023
10014
10024
// Send stuff to our remote peers:
@@ -10735,11 +10745,6 @@ where
10735
10745
}
10736
10746
}
10737
10747
10738
- #[cfg(splicing)]
10739
- pub fn has_pending_splice(&self) -> bool {
10740
- self.pending_splice.is_some()
10741
- }
10742
-
10743
10748
pub fn remove_legacy_scids_before_block(&mut self, height: u32) -> alloc::vec::Drain<u64> {
10744
10749
let end = self
10745
10750
.funding
0 commit comments