pub enum ChannelState {
NegotiatingFunding(NegotiatingFundingFlags),
CollaboratingFundingTx(CollaboratingFundingTxFlags),
SigningCommitment(SigningCommitmentFlags),
AwaitingTxSignatures(AwaitingTxSignaturesFlags),
AwaitingChannelReady(AwaitingChannelReadyFlags),
ChannelReady,
ShuttingDown(ShuttingDownFlags),
Closed(CloseFlags),
Stale,
}Expand description
The state of a channel.
Serialized with adjacently-tagged representation using PascalCase variant names and flags.
This is different from the internal ChannelState in fiber-types which uses
default serde for bincode compatibility.
Variants§
NegotiatingFunding(NegotiatingFundingFlags)
We are negotiating the parameters required for the channel prior to funding it.
For channels opened with external funding, this state is also used together with
NegotiatingFundingFlags::AWAITING_EXTERNAL_FUNDING to indicate that we are waiting
for the user to sign and submit the funding transaction externally.
CollaboratingFundingTx(CollaboratingFundingTxFlags)
We’re collaborating with the other party on the funding transaction.
SigningCommitment(SigningCommitmentFlags)
We have collaborated over the funding and are now waiting for CommitmentSigned messages.
AwaitingTxSignatures(AwaitingTxSignaturesFlags)
We’ve received and sent commitment_signed and are now waiting for both
party to collaborate on creating a valid funding transaction.
AwaitingChannelReady(AwaitingChannelReadyFlags)
We’ve received/sent funding_created and funding_signed and are thus now waiting on the
funding transaction to confirm.
ChannelReady
Both we and our counterparty consider the funding transaction confirmed and the channel is now operational.
ShuttingDown(ShuttingDownFlags)
We’ve successfully negotiated a closing_signed dance. At this point, the ChannelManager
Closed(CloseFlags)
This channel is closed.
Stale
The channel state is potentially outdated (e.g., after a database restore). We must perform a passive audit with the peer before resuming operations.
Trait Implementations§
Source§impl Clone for ChannelState
impl Clone for ChannelState
Source§fn clone(&self) -> ChannelState
fn clone(&self) -> ChannelState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ChannelState
Source§impl Debug for ChannelState
impl Debug for ChannelState
Source§impl<'de> Deserialize<'de> for ChannelState
impl<'de> Deserialize<'de> for ChannelState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ChannelState
Source§impl JsonSchema for ChannelState
impl JsonSchema for ChannelState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more