}
/**
- * When the last update to the channel direction was issued.
- * Value is opaque, as set in the announcement.
+ * The minimum value, which must be relayed to the next hop via the channel
*/
- public int get_last_update() {
- int ret = bindings.ChannelUpdateInfo_get_last_update(this.ptr);
+ public long get_htlc_minimum_msat() {
+ long ret = bindings.ChannelUpdateInfo_get_htlc_minimum_msat(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
/**
- * When the last update to the channel direction was issued.
- * Value is opaque, as set in the announcement.
+ * The minimum value, which must be relayed to the next hop via the channel
*/
- public void set_last_update(int val) {
- bindings.ChannelUpdateInfo_set_last_update(this.ptr, val);
+ public void set_htlc_minimum_msat(long val) {
+ bindings.ChannelUpdateInfo_set_htlc_minimum_msat(this.ptr, val);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
/**
- * Whether the channel can be currently used for payments (in this one direction).
+ * The maximum value which may be relayed to the next hop via the channel.
*/
- public boolean get_enabled() {
- boolean ret = bindings.ChannelUpdateInfo_get_enabled(this.ptr);
+ public long get_htlc_maximum_msat() {
+ long ret = bindings.ChannelUpdateInfo_get_htlc_maximum_msat(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
/**
- * Whether the channel can be currently used for payments (in this one direction).
+ * The maximum value which may be relayed to the next hop via the channel.
*/
- public void set_enabled(boolean val) {
- bindings.ChannelUpdateInfo_set_enabled(this.ptr, val);
+ public void set_htlc_maximum_msat(long val) {
+ bindings.ChannelUpdateInfo_set_htlc_maximum_msat(this.ptr, val);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
/**
- * The difference in CLTV values that you must have when routing through this channel.
+ * Fees charged when the channel is used for routing
*/
- public short get_cltv_expiry_delta() {
- short ret = bindings.ChannelUpdateInfo_get_cltv_expiry_delta(this.ptr);
+ public RoutingFees get_fees() {
+ long ret = bindings.ChannelUpdateInfo_get_fees(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * The difference in CLTV values that you must have when routing through this channel.
+ * Fees charged when the channel is used for routing
*/
- public void set_cltv_expiry_delta(short val) {
- bindings.ChannelUpdateInfo_set_cltv_expiry_delta(this.ptr, val);
+ public void set_fees(org.ldk.structs.RoutingFees val) {
+ bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
/**
- * The minimum value, which must be relayed to the next hop via the channel
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
*/
- public long get_htlc_minimum_msat() {
- long ret = bindings.ChannelUpdateInfo_get_htlc_minimum_msat(this.ptr);
+ public int get_last_update() {
+ int ret = bindings.ChannelUpdateInfo_get_last_update(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
/**
- * The minimum value, which must be relayed to the next hop via the channel
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
*/
- public void set_htlc_minimum_msat(long val) {
- bindings.ChannelUpdateInfo_set_htlc_minimum_msat(this.ptr, val);
+ public void set_last_update(int val) {
+ bindings.ChannelUpdateInfo_set_last_update(this.ptr, val);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
/**
- * The maximum value which may be relayed to the next hop via the channel.
+ * The difference in CLTV values that you must have when routing through this channel.
*/
- public long get_htlc_maximum_msat() {
- long ret = bindings.ChannelUpdateInfo_get_htlc_maximum_msat(this.ptr);
+ public short get_cltv_expiry_delta() {
+ short ret = bindings.ChannelUpdateInfo_get_cltv_expiry_delta(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
/**
- * The maximum value which may be relayed to the next hop via the channel.
+ * The difference in CLTV values that you must have when routing through this channel.
*/
- public void set_htlc_maximum_msat(long val) {
- bindings.ChannelUpdateInfo_set_htlc_maximum_msat(this.ptr, val);
+ public void set_cltv_expiry_delta(short val) {
+ bindings.ChannelUpdateInfo_set_cltv_expiry_delta(this.ptr, val);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
/**
- * Fees charged when the channel is used for routing
+ * Whether the channel can be currently used for payments (in this one direction).
*/
- public RoutingFees get_fees() {
- long ret = bindings.ChannelUpdateInfo_get_fees(this.ptr);
+ public boolean get_enabled() {
+ boolean ret = bindings.ChannelUpdateInfo_get_enabled(this.ptr);
Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
+ return ret;
}
/**
- * Fees charged when the channel is used for routing
+ * Whether the channel can be currently used for payments (in this one direction).
*/
- public void set_fees(org.ldk.structs.RoutingFees val) {
- bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr);
+ public void set_enabled(boolean val) {
+ bindings.ChannelUpdateInfo_set_enabled(this.ptr, val);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
}
/**
bindings.ChannelUpdateInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
}
/**
*
* Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static ChannelUpdateInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, @Nullable org.ldk.structs.ChannelUpdate last_update_message_arg) {
- long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0 : fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
- Reference.reachabilityFence(last_update_arg);
- Reference.reachabilityFence(enabled_arg);
- Reference.reachabilityFence(cltv_expiry_delta_arg);
+ public static ChannelUpdateInfo of(long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, int last_update_arg, short cltv_expiry_delta_arg, boolean enabled_arg, @Nullable org.ldk.structs.ChannelUpdate last_update_message_arg) {
+ long ret = bindings.ChannelUpdateInfo_new(htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg.ptr, last_update_arg, cltv_expiry_delta_arg, enabled_arg, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
Reference.reachabilityFence(htlc_minimum_msat_arg);
Reference.reachabilityFence(htlc_maximum_msat_arg);
Reference.reachabilityFence(fees_arg);
+ Reference.reachabilityFence(last_update_arg);
+ Reference.reachabilityFence(cltv_expiry_delta_arg);
+ Reference.reachabilityFence(enabled_arg);
Reference.reachabilityFence(last_update_message_arg);
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); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fees_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(last_update_message_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelUpdateInfo b) {
- boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (!(o instanceof ChannelUpdateInfo)) return false;
return this.eq((ChannelUpdateInfo)o);
}
+ /**
+ * Get the string representation of a ChannelUpdateInfo object
+ */
+ public String to_str() {
+ String ret = bindings.ChannelUpdateInfo_to_str(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
*/