Skip to content

Commit 525fbe4

Browse files
committed
Remove stale TODO for quiescence check on incoming splice_init
1 parent 4151b97 commit 525fbe4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11537,15 +11537,17 @@ where
1153711537
pub fn validate_splice_init(
1153811538
&self, msg: &msgs::SpliceInit, our_funding_contribution: SignedAmount,
1153911539
) -> Result<FundingScope, ChannelError> {
11540-
// TODO(splicing): Add check that we are the quiescence acceptor
11541-
1154211540
if self.holder_commitment_point.current_point().is_none() {
1154311541
return Err(ChannelError::WarnAndDisconnect(format!(
1154411542
"Channel {} commitment point needs to be advanced once before spliced",
1154511543
self.context.channel_id(),
1154611544
)));
1154711545
}
1154811546

11547+
if !self.context.channel_state.is_quiescent() {
11548+
return Err(ChannelError::WarnAndDisconnect("Quiescence needed to splice".to_owned()));
11549+
}
11550+
1154911551
// Check if a splice has been initiated already.
1155011552
if self.pending_splice.is_some() {
1155111553
return Err(ChannelError::WarnAndDisconnect(format!(
@@ -11686,10 +11688,6 @@ where
1168611688
ES::Target: EntropySource,
1168711689
L::Target: Logger,
1168811690
{
11689-
if !self.context.channel_state.is_quiescent() {
11690-
return Err(ChannelError::WarnAndDisconnect("Quiescence needed to splice".to_owned()));
11691-
}
11692-
1169311691
let our_funding_contribution = SignedAmount::from_sat(our_funding_contribution_satoshis);
1169411692
let splice_funding = self.validate_splice_init(msg, our_funding_contribution)?;
1169511693

0 commit comments

Comments
 (0)