Skip to content

Commit f26274a

Browse files
committed
fix Check is_live instead of Ready
1 parent 05876f5 commit f26274a

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
@@ -8253,9 +8253,9 @@ impl<SP: Deref> FundedChannel<SP> where
82538253
)});
82548254
}
82558255

8256-
if !matches!(self.context.channel_state, ChannelState::ChannelReady(_)) {
8256+
if !self.context.is_live() {
82578257
return Err(APIError::APIMisuseError { err: format!(
8258-
"Channel {} cannot be spliced, as channel is not Ready",
8258+
"Channel {} cannot be spliced, as channel is not live",
82598259
self.context.channel_id()
82608260
)});
82618261
}
@@ -8325,8 +8325,8 @@ impl<SP: Deref> FundedChannel<SP> where
83258325
)));
83268326
}
83278327

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

83328332
// - 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)