X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FPaymentSendFailure.java;h=6a75063c7ded6854b52419ab5a1ce886b42e1efb;hb=890e35a4387758c0447aab34166caa579bbf3a08;hp=a21a5449a09b70cdc8c2dd7d0bcccca609123893;hpb=64bcaa6a2a2f05653c14b9cb8bb97ab2480eaaa5;p=ldk-java diff --git a/src/main/java/org/ldk/structs/PaymentSendFailure.java b/src/main/java/org/ldk/structs/PaymentSendFailure.java index a21a5449..6a75063c 100644 --- a/src/main/java/org/ldk/structs/PaymentSendFailure.java +++ b/src/main/java/org/ldk/structs/PaymentSendFailure.java @@ -44,12 +44,12 @@ public class PaymentSendFailure extends CommonBase { * once you've changed the parameter at error, you can freely retry the payment in full. */ public final static class ParameterError extends PaymentSendFailure { - public final APIError parameter_error; + public final org.ldk.structs.APIError parameter_error; private ParameterError(long ptr, bindings.LDKPaymentSendFailure.ParameterError obj) { super(null, ptr); long parameter_error = obj.parameter_error; - APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error); - parameter_error_hu_conv.ptrs_to.add(this); + org.ldk.structs.APIError parameter_error_hu_conv = org.ldk.structs.APIError.constr_from_ptr(parameter_error); + if (parameter_error_hu_conv != null) { parameter_error_hu_conv.ptrs_to.add(this); }; this.parameter_error = parameter_error_hu_conv; } } @@ -91,8 +91,8 @@ public class PaymentSendFailure extends CommonBase { APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe_conv_10_len]; for (int k = 0; k < all_failed_retry_safe_conv_10_len; k++) { long all_failed_retry_safe_conv_10 = all_failed_retry_safe[k]; - APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10); - all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this); + org.ldk.structs.APIError all_failed_retry_safe_conv_10_hu_conv = org.ldk.structs.APIError.constr_from_ptr(all_failed_retry_safe_conv_10); + if (all_failed_retry_safe_conv_10_hu_conv != null) { all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this); }; all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv; } this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr; @@ -124,7 +124,7 @@ public class PaymentSendFailure extends CommonBase { * * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ - @Nullable public final RouteParameters failed_paths_retry; + @Nullable public final org.ldk.structs.RouteParameters failed_paths_retry; /** * The payment id for the payment, which is now at least partially pending. */ @@ -141,8 +141,8 @@ public class PaymentSendFailure extends CommonBase { } this.results = results_conv_22_arr; long failed_paths_retry = obj.failed_paths_retry; - RouteParameters failed_paths_retry_hu_conv = null; if (failed_paths_retry < 0 || failed_paths_retry > 4096) { failed_paths_retry_hu_conv = new RouteParameters(null, failed_paths_retry); } - failed_paths_retry_hu_conv.ptrs_to.add(this); + org.ldk.structs.RouteParameters failed_paths_retry_hu_conv = null; if (failed_paths_retry < 0 || failed_paths_retry > 4096) { failed_paths_retry_hu_conv = new org.ldk.structs.RouteParameters(null, failed_paths_retry); } + if (failed_paths_retry_hu_conv != null) { failed_paths_retry_hu_conv.ptrs_to.add(this); }; this.failed_paths_retry = failed_paths_retry_hu_conv; this.payment_id = obj.payment_id; } @@ -160,8 +160,8 @@ public class PaymentSendFailure extends CommonBase { long ret = bindings.PaymentSendFailure_clone(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(this); + org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; } @@ -172,8 +172,8 @@ public class PaymentSendFailure extends CommonBase { long ret = bindings.PaymentSendFailure_parameter_error(a.ptr); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } - PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -184,8 +184,8 @@ public class PaymentSendFailure extends CommonBase { long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } - PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -196,8 +196,8 @@ public class PaymentSendFailure extends CommonBase { long ret = bindings.PaymentSendFailure_all_failed_retry_safe(a != null ? Arrays.stream(a).mapToLong(a_conv_10 -> a_conv_10.ptr).toArray() : null); Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } - PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -205,13 +205,14 @@ public class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PartialFailure-variant PaymentSendFailure */ public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, RouteParameters failed_paths_retry, byte[] payment_id) { - long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22 != null ? results_conv_22.ptr : 0).toArray() : null, failed_paths_retry == null ? 0 : failed_paths_retry.ptr & ~1, InternalUtils.check_arr_len(payment_id, 32)); + long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22 != null ? results_conv_22.ptr : 0).toArray() : null, failed_paths_retry == null ? 0 : failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32)); Reference.reachabilityFence(results); Reference.reachabilityFence(failed_paths_retry); Reference.reachabilityFence(payment_id); if (ret >= 0 && ret <= 4096) { return null; } - PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(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(failed_paths_retry); }; return ret_hu_conv; }