Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.DirectedChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DirectedChannelInfo(null, ret); }
- ret_hu_conv.ptrs_to.add(this);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelInfo(null, ret); }
- ret_hu_conv.ptrs_to.add(this);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
- * Returns information for the direction.
+ * Returns the [`EffectiveCapacity`] of the channel in the direction.
*
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * This is either the total capacity from the funding transaction, if known, or the
+ * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known,
+ * otherwise.
*/
- @Nullable
- public ChannelUpdateInfo direction() {
- long ret = bindings.DirectedChannelInfo_direction(this.ptr);
+ public EffectiveCapacity effective_capacity() {
+ long ret = bindings.DirectedChannelInfo_effective_capacity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelUpdateInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelUpdateInfo(null, ret); }
- ret_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.EffectiveCapacity ret_hu_conv = org.ldk.structs.EffectiveCapacity.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
- * Returns the maximum HTLC amount allowed over the channel in the direction.
+ * Returns the `node_id` of the source hop.
+ *
+ * Refers to the `node_id` forwarding the payment to the next hop.
*/
- public long htlc_maximum_msat() {
- long ret = bindings.DirectedChannelInfo_htlc_maximum_msat(this.ptr);
+ public NodeId source() {
+ long ret = bindings.DirectedChannelInfo_source(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * Returns the [`EffectiveCapacity`] of the channel in the direction.
+ * Returns the `node_id` of the target hop.
*
- * This is either the total capacity from the funding transaction, if known, or the
- * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known,
- * otherwise.
+ * Refers to the `node_id` receiving the payment from the previous hop.
*/
- public EffectiveCapacity effective_capacity() {
- long ret = bindings.DirectedChannelInfo_effective_capacity(this.ptr);
+ public NodeId target() {
+ long ret = bindings.DirectedChannelInfo_target(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.EffectiveCapacity ret_hu_conv = org.ldk.structs.EffectiveCapacity.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}