Skip to content

Commit 4ed8a9b

Browse files
committed
fix Check is_live instead of Ready
1 parent c5e5866 commit 4ed8a9b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8428,9 +8428,9 @@ impl<SP: Deref> FundedChannel<SP> where
84288428
)});
84298429
}
84308430

8431-
if !matches!(self.context.channel_state, ChannelState::ChannelReady(_)) {
8431+
if !self.context.is_live() {
84328432
return Err(APIError::APIMisuseError { err: format!(
8433-
"Channel {} cannot be spliced, as channel is not Ready",
8433+
"Channel {} cannot be spliced, as channel is not live",
84348434
self.context.channel_id()
84358435
)});
84368436
}
@@ -8500,8 +8500,8 @@ impl<SP: Deref> FundedChannel<SP> where
85008500
)));
85018501
}
85028502

8503-
if !matches!(self.context.channel_state, ChannelState::ChannelReady(_)) {
8504-
return Err(ChannelError::Warn(format!("Splicing requested on a channel that is not Ready")));
8503+
if !self.context.is_live() {
8504+
return Err(ChannelError::Warn(format!("Splicing requested on a channel that is not live")));
85058505
}
85068506

85078507
// - If it has received shutdown:

lightning/src/ln/functional_tests_splice.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
// You may not use this file except in accordance with one or both of these
88
// licenses.
99

10-
//! Tests that test standing up a network of ChannelManagers, creating channels, sending
11-
//! payments/messages between them, and often checking the resulting ChannelMonitors are able to
12-
//! claim outputs on-chain.
13-
1410
use crate::events::{Event, MessageSendEvent, MessageSendEventsProvider};
1511
use crate::ln::functional_test_utils::*;
1612
use crate::ln::msgs::ChannelMessageHandler;

0 commit comments

Comments
 (0)