Skip to content

Commit 5ceab19

Browse files
committed
f - rename Intermediate to Undefined
1 parent 4055c8b commit 5ceab19

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lightning/src/ln/channel.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
11331133
/// The `ChannelPhase` enum describes the current phase in life of a lightning channel with each of
11341134
/// its variants containing an appropriate channel struct.
11351135
enum ChannelPhase<SP: Deref> where SP::Target: SignerProvider {
1136-
Intermediate,
1136+
Undefined,
11371137
UnfundedOutboundV1(OutboundV1Channel<SP>),
11381138
UnfundedInboundV1(InboundV1Channel<SP>),
11391139
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
@@ -1147,7 +1147,7 @@ impl<SP: Deref> Channel<SP> where
11471147
{
11481148
pub fn context(&self) -> &ChannelContext<SP> {
11491149
match &self.phase {
1150-
ChannelPhase::Intermediate => unreachable!(),
1150+
ChannelPhase::Undefined => unreachable!(),
11511151
ChannelPhase::Funded(chan) => &chan.context,
11521152
ChannelPhase::UnfundedOutboundV1(chan) => &chan.context,
11531153
ChannelPhase::UnfundedInboundV1(chan) => &chan.context,
@@ -1157,7 +1157,7 @@ impl<SP: Deref> Channel<SP> where
11571157

11581158
pub fn context_mut(&mut self) -> &mut ChannelContext<SP> {
11591159
match &mut self.phase {
1160-
ChannelPhase::Intermediate => unreachable!(),
1160+
ChannelPhase::Undefined => unreachable!(),
11611161
ChannelPhase::Funded(chan) => &mut chan.context,
11621162
ChannelPhase::UnfundedOutboundV1(chan) => &mut chan.context,
11631163
ChannelPhase::UnfundedInboundV1(chan) => &mut chan.context,
@@ -1167,7 +1167,7 @@ impl<SP: Deref> Channel<SP> where
11671167

11681168
pub fn unfunded_context_mut(&mut self) -> Option<&mut UnfundedChannelContext> {
11691169
match &mut self.phase {
1170-
ChannelPhase::Intermediate => unreachable!(),
1170+
ChannelPhase::Undefined => unreachable!(),
11711171
ChannelPhase::Funded(_) => { debug_assert!(false); None },
11721172
ChannelPhase::UnfundedOutboundV1(chan) => Some(&mut chan.unfunded_context),
11731173
ChannelPhase::UnfundedInboundV1(chan) => Some(&mut chan.unfunded_context),
@@ -1256,7 +1256,7 @@ impl<SP: Deref> Channel<SP> where
12561256
&mut self, chain_hash: ChainHash, logger: &L,
12571257
) -> Option<SignerResumeUpdates> where L::Target: Logger {
12581258
match &mut self.phase {
1259-
ChannelPhase::Intermediate => unreachable!(),
1259+
ChannelPhase::Undefined => unreachable!(),
12601260
ChannelPhase::Funded(chan) => Some(chan.signer_maybe_unblocked(logger)),
12611261
ChannelPhase::UnfundedOutboundV1(chan) => {
12621262
let (open_channel, funding_created) = chan.signer_maybe_unblocked(chain_hash, logger);
@@ -1297,7 +1297,7 @@ impl<SP: Deref> Channel<SP> where
12971297

12981298
pub fn is_resumable(&self) -> bool {
12991299
match &self.phase {
1300-
ChannelPhase::Intermediate => unreachable!(),
1300+
ChannelPhase::Undefined => unreachable!(),
13011301
ChannelPhase::Funded(_) => false,
13021302
ChannelPhase::UnfundedOutboundV1(chan) => chan.is_resumable(),
13031303
ChannelPhase::UnfundedInboundV1(_) => false,
@@ -1309,7 +1309,7 @@ impl<SP: Deref> Channel<SP> where
13091309
&mut self, chain_hash: ChainHash, logger: &L,
13101310
) -> Option<OpenChannelMessage> where L::Target: Logger {
13111311
match &mut self.phase {
1312-
ChannelPhase::Intermediate => unreachable!(),
1312+
ChannelPhase::Undefined => unreachable!(),
13131313
ChannelPhase::Funded(_) => None,
13141314
ChannelPhase::UnfundedOutboundV1(chan) => {
13151315
let logger = WithChannelContext::from(logger, &chan.context, None);
@@ -1351,7 +1351,7 @@ impl<SP: Deref> Channel<SP> where
13511351
L::Target: Logger,
13521352
{
13531353
match &mut self.phase {
1354-
ChannelPhase::Intermediate => unreachable!(),
1354+
ChannelPhase::Undefined => unreachable!(),
13551355
ChannelPhase::Funded(_) => Ok(None),
13561356
ChannelPhase::UnfundedOutboundV1(chan) => {
13571357
let logger = WithChannelContext::from(logger, &chan.context, None);

0 commit comments

Comments
 (0)