@@ -11537,15 +11537,17 @@ where
11537
11537
pub fn validate_splice_init(
11538
11538
&self, msg: &msgs::SpliceInit, our_funding_contribution: SignedAmount,
11539
11539
) -> Result<FundingScope, ChannelError> {
11540
- // TODO(splicing): Add check that we are the quiescence acceptor
11541
-
11542
11540
if self.holder_commitment_point.current_point().is_none() {
11543
11541
return Err(ChannelError::WarnAndDisconnect(format!(
11544
11542
"Channel {} commitment point needs to be advanced once before spliced",
11545
11543
self.context.channel_id(),
11546
11544
)));
11547
11545
}
11548
11546
11547
+ if !self.context.channel_state.is_quiescent() {
11548
+ return Err(ChannelError::WarnAndDisconnect("Quiescence needed to splice".to_owned()));
11549
+ }
11550
+
11549
11551
// Check if a splice has been initiated already.
11550
11552
if self.pending_splice.is_some() {
11551
11553
return Err(ChannelError::WarnAndDisconnect(format!(
@@ -11686,10 +11688,6 @@ where
11686
11688
ES::Target: EntropySource,
11687
11689
L::Target: Logger,
11688
11690
{
11689
- if !self.context.channel_state.is_quiescent() {
11690
- return Err(ChannelError::WarnAndDisconnect("Quiescence needed to splice".to_owned()));
11691
- }
11692
-
11693
11691
let our_funding_contribution = SignedAmount::from_sat(our_funding_contribution_satoshis);
11694
11692
let splice_funding = self.validate_splice_init(msg, our_funding_contribution)?;
11695
11693
0 commit comments