* or printed to stdout). Otherwise, a well crafted error message may exploit
* a security vulnerability in the terminal emulator or the logging subsystem.
*/
- public final String peer_msg;
+ public final java.lang.String peer_msg;
private CounterpartyForceClosed(long ptr, bindings.LDKClosureReason.CounterpartyForceClosed obj) {
super(null, ptr);
this.peer_msg = obj.peer_msg;
/**
* A developer-readable error message which we generated.
*/
- public final String err;
+ public final java.lang.String err;
private ProcessingError(long ptr, bindings.LDKClosureReason.ProcessingError obj) {
super(null, ptr);
this.err = obj.err;
}
}
/**
- * 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.
+ * 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.
+ *
+ * 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.
*/
public final static class DisconnectedPeer extends ClosureReason {
private DisconnectedPeer(long ptr, bindings.LDKClosureReason.DisconnectedPeer obj) {
long ret = bindings.ClosureReason_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg);
Reference.reachabilityFence(peer_msg);
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason holder_force_closed() {
long ret = bindings.ClosureReason_holder_force_closed();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason cooperative_closure() {
long ret = bindings.ClosureReason_cooperative_closure();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason commitment_tx_confirmed() {
long ret = bindings.ClosureReason_commitment_tx_confirmed();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason funding_timed_out() {
long ret = bindings.ClosureReason_funding_timed_out();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
long ret = bindings.ClosureReason_processing_error(err);
Reference.reachabilityFence(err);
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason disconnected_peer() {
long ret = bindings.ClosureReason_disconnected_peer();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
public static ClosureReason outdated_channel_manager() {
long ret = bindings.ClosureReason_outdated_channel_manager();
if (ret >= 0 && ret <= 4096) { return null; }
- ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}