Enum breez_sdk_liquid::lightning::events::ClosureReason
pub enum ClosureReason {
CounterpartyForceClosed {
peer_msg: UntrustedString,
},
HolderForceClosed,
CooperativeClosure,
CommitmentTxConfirmed,
FundingTimedOut,
ProcessingError {
err: String,
},
DisconnectedPeer,
OutdatedChannelManager,
CounterpartyCoopClosedUnfundedChannel,
FundingBatchClosure,
}
Expand description
The reason the channel was closed. See individual variants for more details.
Variants§
CounterpartyForceClosed
Closure generated from receiving a peer error message.
Our counterparty may have broadcasted their latest commitment state, and we have as well.
Fields
peer_msg: UntrustedString
The error which the peer sent us.
Be careful about printing the peer_msg, a well-crafted message could exploit
a security vulnerability in the terminal emulator or the logging subsystem.
To be safe, use Display
on UntrustedString
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
Closure generated from processing an event, likely a HTLC forward/relay/reception.
DisconnectedPeer
The peer disconnected prior to funding completing. In this case the spec mandates that we forget the channel entirely - we can attempt again if the peer reconnects.
This includes cases where we restarted prior to funding completion, including prior to the
initial ChannelMonitor
persistence completing.
In LDK versions prior to 0.0.107 this could also occur if we were unable to connect to the peer because of mutual incompatibility between us and our channel counterparty.
OutdatedChannelManager
Closure generated from ChannelManager::read
if the ChannelMonitor
is newer than
the ChannelManager
deserialized.
CounterpartyCoopClosedUnfundedChannel
The counterparty requested a cooperative close of a channel that had not been funded yet. The channel has been immediately closed.
FundingBatchClosure
Another channel in the same funding batch closed before the funding transaction was ready to be broadcast.
Trait Implementations§
§impl Clone for ClosureReason
impl Clone for ClosureReason
§fn clone(&self) -> ClosureReason
fn clone(&self) -> ClosureReason
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ClosureReason
impl Debug for ClosureReason
§impl Display for ClosureReason
impl Display for ClosureReason
§impl MaybeReadable for ClosureReason
impl MaybeReadable for ClosureReason
§fn read<R>(reader: &mut R) -> Result<Option<ClosureReason>, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<Option<ClosureReason>, DecodeError>where
R: Read,
Self
in from the given Read
.§impl PartialEq for ClosureReason
impl PartialEq for ClosureReason
§impl Writeable for ClosureReason
impl Writeable for ClosureReason
impl Eq for ClosureReason
impl StructuralPartialEq for ClosureReason
Auto Trait Implementations§
impl Freeze for ClosureReason
impl RefUnwindSafe for ClosureReason
impl Send for ClosureReason
impl Sync for ClosureReason
impl Unpin for ClosureReason
impl UnwindSafe for ClosureReason
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request