[Java] Update batteries and tests to LDK 0.0.117
[ldk-java] / src / main / java / org / ldk / structs / ChannelUsage.java
index 2edd4f630d99a8baa53d7a079c7f25a4961b22ad..0aba7c6ca856b8faf018964a3d4dea3c8145f7f1 100644 (file)
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
 
 
 /**
- * Proposed use of a channel passed as a parameter to [`Score::channel_penalty_msat`].
+ * Proposed use of a channel passed as a parameter to [`ScoreLookUp::channel_penalty_msat`].
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class ChannelUsage extends CommonBase {
@@ -73,16 +73,17 @@ public class ChannelUsage extends CommonBase {
        /**
         * The effective capacity of the channel.
         */
-       public void set_effective_capacity(EffectiveCapacity val) {
+       public void set_effective_capacity(org.ldk.structs.EffectiveCapacity val) {
                bindings.ChannelUsage_set_effective_capacity(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
         * Constructs a new ChannelUsage given each field
         */
-       public static ChannelUsage of(long amount_msat_arg, long inflight_htlc_msat_arg, EffectiveCapacity effective_capacity_arg) {
+       public static ChannelUsage of(long amount_msat_arg, long inflight_htlc_msat_arg, org.ldk.structs.EffectiveCapacity effective_capacity_arg) {
                long ret = bindings.ChannelUsage_new(amount_msat_arg, inflight_htlc_msat_arg, effective_capacity_arg.ptr);
                Reference.reachabilityFence(amount_msat_arg);
                Reference.reachabilityFence(inflight_htlc_msat_arg);
@@ -90,6 +91,7 @@ public class ChannelUsage extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ChannelUsage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelUsage(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(effective_capacity_arg); };
                return ret_hu_conv;
        }