@@ -9270,12 +9270,17 @@ where
9270
9270
&self.context.channel_id,
9271
9271
);
9272
9272
9273
- let announcement_sigs = self
9274
- .maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9273
+ let funding_promoted = self.maybe_promote_splice_funding(
9274
+ splice_locked.splice_txid, confirmed_funding_index, logger,
9275
+ );
9276
+ let funding_txo = funding_promoted
9277
+ .then(|| self.funding.get_funding_txo())
9278
+ .flatten();
9279
+ let announcement_sigs = funding_promoted
9275
9280
.then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
9276
9281
.flatten();
9277
9282
9278
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), announcement_sigs));
9283
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), announcement_sigs));
9279
9284
}
9280
9285
}
9281
9286
@@ -9433,16 +9438,21 @@ where
9433
9438
if let Some(splice_locked) = pending_splice.check_get_splice_locked(&self.context, funding, height) {
9434
9439
log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
9435
9440
9436
- let announcement_sigs = self
9437
- .maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9441
+ let funding_promoted = self.maybe_promote_splice_funding(
9442
+ splice_locked.splice_txid, confirmed_funding_index, logger,
9443
+ );
9444
+ let funding_txo = funding_promoted
9445
+ .then(|| self.funding.get_funding_txo())
9446
+ .flatten();
9447
+ let announcement_sigs = funding_promoted
9438
9448
.then(|| chain_node_signer
9439
9449
.and_then(|(chain_hash, node_signer, user_config)|
9440
9450
self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)
9441
9451
)
9442
9452
)
9443
9453
.flatten();
9444
9454
9445
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), timed_out_htlcs, announcement_sigs));
9455
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), timed_out_htlcs, announcement_sigs));
9446
9456
}
9447
9457
}
9448
9458
@@ -9936,7 +9946,7 @@ where
9936
9946
pub fn splice_locked<NS: Deref, L: Deref>(
9937
9947
&mut self, msg: &msgs::SpliceLocked, node_signer: &NS, chain_hash: ChainHash,
9938
9948
user_config: &UserConfig, best_block: &BestBlock, logger: &L,
9939
- ) -> Result<Option<msgs::AnnouncementSignatures>, ChannelError>
9949
+ ) -> Result<( Option<OutPoint>, Option< msgs::AnnouncementSignatures>) , ChannelError>
9940
9950
where
9941
9951
NS::Target: NodeSigner,
9942
9952
L::Target: Logger,
@@ -9969,13 +9979,15 @@ where
9969
9979
&self.context.channel_id,
9970
9980
);
9971
9981
promote_splice_funding!(self, funding);
9972
- return Ok(self.get_announcement_sigs(
9982
+ let funding_txo = self.funding.get_funding_txo();
9983
+ let announcement_sigs = self.get_announcement_sigs(
9973
9984
node_signer,
9974
9985
chain_hash,
9975
9986
user_config,
9976
9987
best_block.height,
9977
9988
logger,
9978
- ));
9989
+ );
9990
+ return Ok((funding_txo, announcement_sigs));
9979
9991
}
9980
9992
9981
9993
let err = "unknown splice funding txid";
@@ -9999,7 +10011,7 @@ where
9999
10011
}
10000
10012
10001
10013
pending_splice.received_funding_txid = Some(msg.splice_txid);
10002
- Ok(None)
10014
+ Ok(( None, None) )
10003
10015
}
10004
10016
10005
10017
// Send stuff to our remote peers:
@@ -10726,11 +10738,6 @@ where
10726
10738
}
10727
10739
}
10728
10740
10729
- #[cfg(splicing)]
10730
- pub fn has_pending_splice(&self) -> bool {
10731
- self.pending_splice.is_some()
10732
- }
10733
-
10734
10741
pub fn remove_legacy_scids_before_block(&mut self, height: u32) -> alloc::vec::Drain<u64> {
10735
10742
let end = self
10736
10743
.funding
0 commit comments