Enum lightning::util::events::ClosureReason [−][src]
pub enum ClosureReason {
CounterpartyForceClosed {
peer_msg: String,
},
HolderForceClosed,
CooperativeClosure,
CommitmentTxConfirmed,
ProcessingError {
err: String,
},
DisconnectedPeer,
OutdatedChannelManager,
}
Expand description
The reason the channel was closed. See individual variants more details.
Variants
Closure generated from receiving a peer error message.
Our counterparty may have broadcasted their latest commitment state, and we have as well.
Fields of CounterpartyForceClosed
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 ChannelManager::force_close_channel
, called by the user.
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.
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
.
Closure generated from processing an event, likely a HTLC forward/relay/reception.
Fields of ProcessingError
err: String
A developer-readable error message which we generated.
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.
Closure generated from ChannelManager::read
if the ChannelMonitor is newer than
the ChannelManager deserialized.
Trait Implementations
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
impl RefUnwindSafe for ClosureReason
impl Send for ClosureReason
impl Sync for ClosureReason
impl Unpin for ClosureReason
impl UnwindSafe for ClosureReason
Blanket Implementations
Mutably borrows from an owned value. Read more