Package org.ldk.structs
Class ClosureReason
- java.lang.Object
-
- org.ldk.structs.ClosureReason
-
- Direct Known Subclasses:
ClosureReason.CommitmentTxConfirmed
,ClosureReason.CooperativeClosure
,ClosureReason.CounterpartyForceClosed
,ClosureReason.DisconnectedPeer
,ClosureReason.FundingTimedOut
,ClosureReason.HolderForceClosed
,ClosureReason.OutdatedChannelManager
,ClosureReason.ProcessingError
public class ClosureReason extends Object
The reason the channel was closed. See individual variants more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClosureReason.CommitmentTxConfirmed
A commitment transaction was confirmed on chain, closing the channel.static class
ClosureReason.CooperativeClosure
The channel was closed after negotiating a cooperative close and we've now broadcasted the cooperative close transaction.static class
ClosureReason.CounterpartyForceClosed
Closure generated from receiving a peer error message.static class
ClosureReason.DisconnectedPeer
The peer disconnected prior to funding completing.static class
ClosureReason.FundingTimedOut
The funding transaction failed to confirm in a timely manner on an inbound channel.static class
ClosureReason.HolderForceClosed
Closure generated from [`ChannelManager::force_close_channel`], called by the user.static class
ClosureReason.OutdatedChannelManager
Closure generated from `ChannelManager::read` if the [`ChannelMonitor`] is newer than the [`ChannelManager`] deserialized.static class
ClosureReason.ProcessingError
Closure generated from processing an event, likely a HTLC forward/relay/reception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClosureReason
clone()
Creates a copy of the ClosureReasonstatic ClosureReason
commitment_tx_confirmed()
Utility method to constructs a new CommitmentTxConfirmed-variant ClosureReasonstatic ClosureReason
cooperative_closure()
Utility method to constructs a new CooperativeClosure-variant ClosureReasonstatic ClosureReason
counterparty_force_closed(UntrustedString peer_msg)
Utility method to constructs a new CounterpartyForceClosed-variant ClosureReasonstatic ClosureReason
disconnected_peer()
Utility method to constructs a new DisconnectedPeer-variant ClosureReasonboolean
eq(ClosureReason b)
Checks if two ClosureReasons contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
static ClosureReason
funding_timed_out()
Utility method to constructs a new FundingTimedOut-variant ClosureReasonstatic ClosureReason
holder_force_closed()
Utility method to constructs a new HolderForceClosed-variant ClosureReasonstatic ClosureReason
outdated_channel_manager()
Utility method to constructs a new OutdatedChannelManager-variant ClosureReasonstatic ClosureReason
processing_error(String err)
Utility method to constructs a new ProcessingError-variant ClosureReasonbyte[]
write()
Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public ClosureReason clone()
Creates a copy of the ClosureReason
-
counterparty_force_closed
public static ClosureReason counterparty_force_closed(UntrustedString peer_msg)
Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason
-
holder_force_closed
public static ClosureReason holder_force_closed()
Utility method to constructs a new HolderForceClosed-variant ClosureReason
-
cooperative_closure
public static ClosureReason cooperative_closure()
Utility method to constructs a new CooperativeClosure-variant ClosureReason
-
commitment_tx_confirmed
public static ClosureReason commitment_tx_confirmed()
Utility method to constructs a new CommitmentTxConfirmed-variant ClosureReason
-
funding_timed_out
public static ClosureReason funding_timed_out()
Utility method to constructs a new FundingTimedOut-variant ClosureReason
-
processing_error
public static ClosureReason processing_error(String err)
Utility method to constructs a new ProcessingError-variant ClosureReason
-
disconnected_peer
public static ClosureReason disconnected_peer()
Utility method to constructs a new DisconnectedPeer-variant ClosureReason
-
outdated_channel_manager
public static ClosureReason outdated_channel_manager()
Utility method to constructs a new OutdatedChannelManager-variant ClosureReason
-
eq
public boolean eq(ClosureReason b)
Checks if two ClosureReasons contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
write
public byte[] write()
Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
-
-