Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / Router.java
index 4174246eea4bfc25126ac80b5675dd7d03fffdfa..b83762e1d8375fadb4671e2ca9c0cc801c15e071 100644 (file)
@@ -47,7 +47,7 @@ public class Router extends CommonBase {
                                Score ret_hu_conv = new Score(null, scorer);
                                ret_hu_conv.ptrs_to.add(this);
                                Result_RouteLightningErrorZ ret = arg.find_route(payer, params_hu_conv, first_hops_conv_16_arr, ret_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
+                               long result = ret == null ? 0 : ret.clone_ptr();
                                return result;
                        }
                });
@@ -59,7 +59,7 @@ public class Router extends CommonBase {
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public Result_RouteLightningErrorZ find_route(byte[] payer, RouteParameters params, @Nullable ChannelDetails[] first_hops, Score scorer) {
-               long ret = bindings.Router_find_route(this.ptr, payer, params == null ? 0 : params.ptr & ~1, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray() : null, scorer == null ? 0 : scorer.ptr);
+               long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), params == null ? 0 : params.ptr & ~1, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray() : null, scorer == null ? 0 : scorer.ptr);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                this.ptrs_to.add(params);