/**
* Fees charged when the channel is used for routing
*/
- public void set_fees(RoutingFees val) {
- bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr);
+ public void set_fees(org.ldk.structs.RoutingFees val) {
+ bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public void set_last_update_message(@Nullable ChannelUpdate val) {
+ public void set_last_update_message(@Nullable org.ldk.structs.ChannelUpdate val) {
bindings.ChannelUpdateInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
/**
* Constructs a new ChannelUpdateInfo given each field
+ *
+ * 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, RoutingFees fees_arg, 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);
+ 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.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);
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelUpdateInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * 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.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ 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
*/