Enum lightning::util::events::ClosureReason[][src]

pub enum ClosureReason {
    CounterpartyForceClosed {
        peer_msg: String,
    },
    HolderForceClosed,
    CooperativeClosure,
    CommitmentTxConfirmed,
    FundingTimedOut,
    ProcessingError {
        err: String,
    },
    DisconnectedPeer,
    OutdatedChannelManager,
}
Expand description

The reason the channel was closed. See individual variants more details.

Variants

CounterpartyForceClosed

Fields

peer_msg: String

The error which the peer sent us.

The string should be sanitized before it is used (e.g emitted to logs or printed to stdout). Otherwise, a well crafted error message may exploit a security vulnerability in the terminal emulator or the logging subsystem.

Closure generated from receiving a peer error message.

Our counterparty may have broadcasted their latest commitment state, and we have as well.

HolderForceClosed

Closure generated from ChannelManager::force_close_channel, called by the user.

CooperativeClosure

The channel was closed after negotiating a cooperative close and we’ve now broadcasted the cooperative close transaction. Note the shutdown may have been initiated by us.

CommitmentTxConfirmed

A commitment transaction was confirmed on chain, closing the channel. Most likely this commitment transaction came from our counterparty, but it may also have come from a copy of our own ChannelMonitor.

FundingTimedOut

The funding transaction failed to confirm in a timely manner on an inbound channel.

ProcessingError

Fields

err: String

A developer-readable error message which we generated.

Closure generated from processing an event, likely a HTLC forward/relay/reception.

DisconnectedPeer

The PeerManager informed us that we’ve disconnected from the peer. We close channels if the PeerManager informed us that it is unlikely we’ll be able to connect to the peer again in the future or if the peer disconnected before we finished negotiating the channel open. The first case may be caused by incompatible features which our counterparty, or we, require.

OutdatedChannelManager

Closure generated from ChannelManager::read if the ChannelMonitor is newer than the ChannelManager deserialized.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Reads a Self in from the given Read

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Writes self out to the given Writer

Writes self out to a Vec

Writes self out to a Vec

Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.