@@ -2188,7 +2188,6 @@ impl PendingSplice {
2188
2188
},
2189
2189
}
2190
2190
}
2191
-
2192
2191
}
2193
2192
2194
2193
/// Wrapper around a [`Transaction`] useful for caching the result of [`Transaction::compute_txid`].
@@ -9279,12 +9278,18 @@ where
9279
9278
&self.context.channel_id,
9280
9279
);
9281
9280
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
9284
9289
.then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
9285
9290
.flatten();
9286
9291
9287
- return Ok((Some(FundingConfirmedMessage::Splice(splice_locked)), announcement_sigs));
9292
+ return Ok((Some(FundingConfirmedMessage::Splice(splice_locked, funding_txo )), announcement_sigs));
9288
9293
}
9289
9294
}
9290
9295
@@ -9442,16 +9447,22 @@ where
9442
9447
if let Some(splice_locked) = pending_splice.check_get_splice_locked(&self.context, funding, height) {
9443
9448
log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
9444
9449
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
9447
9458
.then(|| chain_node_signer
9448
9459
.and_then(|(chain_hash, node_signer, user_config)|
9449
9460
self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)
9450
9461
)
9451
9462
)
9452
9463
.flatten();
9453
9464
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));
9455
9466
}
9456
9467
}
9457
9468
@@ -9945,7 +9956,7 @@ where
9945
9956
pub fn splice_locked<NS: Deref, L: Deref>(
9946
9957
&mut self, msg: &msgs::SpliceLocked, node_signer: &NS, chain_hash: ChainHash,
9947
9958
user_config: &UserConfig, best_block: &BestBlock, logger: &L,
9948
- ) -> Result<Option<msgs::AnnouncementSignatures>, ChannelError>
9959
+ ) -> Result<( Option<OutPoint>, Option< msgs::AnnouncementSignatures>) , ChannelError>
9949
9960
where
9950
9961
NS::Target: NodeSigner,
9951
9962
L::Target: Logger,
@@ -9978,13 +9989,18 @@ where
9978
9989
&self.context.channel_id,
9979
9990
);
9980
9991
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(
9982
9997
node_signer,
9983
9998
chain_hash,
9984
9999
user_config,
9985
10000
best_block.height,
9986
10001
logger,
9987
- ));
10002
+ );
10003
+ return Ok((Some(funding_txo), announcement_sigs));
9988
10004
}
9989
10005
9990
10006
let err = "unknown splice funding txid";
@@ -10008,7 +10024,7 @@ where
10008
10024
}
10009
10025
10010
10026
pending_splice.received_funding_txid = Some(msg.splice_txid);
10011
- Ok(None)
10027
+ Ok(( None, None) )
10012
10028
}
10013
10029
10014
10030
// Send stuff to our remote peers:
@@ -10735,11 +10751,6 @@ where
10735
10751
}
10736
10752
}
10737
10753
10738
- #[cfg(splicing)]
10739
- pub fn has_pending_splice(&self) -> bool {
10740
- self.pending_splice.is_some()
10741
- }
10742
-
10743
10754
pub fn remove_legacy_scids_before_block(&mut self, height: u32) -> alloc::vec::Drain<u64> {
10744
10755
let end = self
10745
10756
.funding
0 commit comments