@@ -9260,12 +9260,17 @@ where
9260
9260
&self.context.channel_id,
9261
9261
);
9262
9262
9263
- let announcement_sigs = self
9264
- .maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9263
+ let funding_promoted = self.maybe_promote_splice_funding(
9264
+ splice_locked.splice_txid, confirmed_funding_index, logger,
9265
+ );
9266
+ let funding_txo = funding_promoted
9267
+ .then(|| self.funding.get_funding_txo())
9268
+ .flatten();
9269
+ let announcement_sigs = funding_promoted
9265
9270
.then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
9266
9271
.flatten();
9267
9272
9268
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), announcement_sigs));
9273
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), announcement_sigs));
9269
9274
}
9270
9275
}
9271
9276
@@ -9426,16 +9431,21 @@ where
9426
9431
9427
9432
log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
9428
9433
9429
- let announcement_sigs = self
9430
- .maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9434
+ let funding_promoted = self.maybe_promote_splice_funding(
9435
+ splice_locked.splice_txid, confirmed_funding_index, logger,
9436
+ );
9437
+ let funding_txo = funding_promoted
9438
+ .then(|| self.funding.get_funding_txo())
9439
+ .flatten();
9440
+ let announcement_sigs = funding_promoted
9431
9441
.then(|| chain_node_signer
9432
9442
.and_then(|(chain_hash, node_signer, user_config)|
9433
9443
self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)
9434
9444
)
9435
9445
)
9436
9446
.flatten();
9437
9447
9438
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), timed_out_htlcs, announcement_sigs));
9448
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), timed_out_htlcs, announcement_sigs));
9439
9449
}
9440
9450
}
9441
9451
@@ -9929,7 +9939,7 @@ where
9929
9939
pub fn splice_locked<NS: Deref, L: Deref>(
9930
9940
&mut self, msg: &msgs::SpliceLocked, node_signer: &NS, chain_hash: ChainHash,
9931
9941
user_config: &UserConfig, best_block: &BestBlock, logger: &L,
9932
- ) -> Result<Option<msgs::AnnouncementSignatures>, ChannelError>
9942
+ ) -> Result<( Option<OutPoint>, Option< msgs::AnnouncementSignatures>) , ChannelError>
9933
9943
where
9934
9944
NS::Target: NodeSigner,
9935
9945
L::Target: Logger,
@@ -9962,13 +9972,15 @@ where
9962
9972
&self.context.channel_id,
9963
9973
);
9964
9974
promote_splice_funding!(self, funding);
9965
- return Ok(self.get_announcement_sigs(
9975
+ let funding_txo = self.funding.get_funding_txo();
9976
+ let announcement_sigs = self.get_announcement_sigs(
9966
9977
node_signer,
9967
9978
chain_hash,
9968
9979
user_config,
9969
9980
best_block.height,
9970
9981
logger,
9971
- ));
9982
+ );
9983
+ return Ok((funding_txo, announcement_sigs));
9972
9984
}
9973
9985
9974
9986
let err = "unknown splice funding txid";
@@ -9992,7 +10004,7 @@ where
9992
10004
}
9993
10005
9994
10006
pending_splice.received_funding_txid = Some(msg.splice_txid);
9995
- Ok(None)
10007
+ Ok(( None, None) )
9996
10008
}
9997
10009
9998
10010
// Send stuff to our remote peers:
@@ -10719,11 +10731,6 @@ where
10719
10731
}
10720
10732
}
10721
10733
10722
- #[cfg(splicing)]
10723
- pub fn has_pending_splice(&self) -> bool {
10724
- self.pending_splice.is_some()
10725
- }
10726
-
10727
10734
pub fn remove_legacy_scids_before_block(&mut self, height: u32) -> alloc::vec::Drain<u64> {
10728
10735
let end = self
10729
10736
.funding
0 commit comments