X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FPaymentParameters.cs;h=3f38ad62c09e0e21a5a1dbfdaab6c633f84c12a0;hp=4ac140d34609451965eb06734f329207ce51ea98;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hpb=a32b8843c44637ebd82c83390d17db573b972153 diff --git a/c_sharp/src/org/ldk/structs/PaymentParameters.cs b/c_sharp/src/org/ldk/structs/PaymentParameters.cs index 4ac140d3..3f38ad62 100644 --- a/c_sharp/src/org/ldk/structs/PaymentParameters.cs +++ b/c_sharp/src/org/ldk/structs/PaymentParameters.cs @@ -167,17 +167,44 @@ public class PaymentParameters : CommonBase { GC.KeepAlive(val); } + /** + * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this + * payment was previously attempted over and which caused the payment to fail. Future attempts + * for the same payment shouldn't be relayed through any of these blinded paths. + * + * Returns a copy of the field. + */ + public long[] get_previously_failed_blinded_path_idxs() { + long ret = bindings.PaymentParameters_get_previously_failed_blinded_path_idxs(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + long[] ret_conv = InternalUtils.decodeUint64Array(ret); + return ret_conv; + } + + /** + * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this + * payment was previously attempted over and which caused the payment to fail. Future attempts + * for the same payment shouldn't be relayed through any of these blinded paths. + */ + public void set_previously_failed_blinded_path_idxs(long[] val) { + bindings.PaymentParameters_set_previously_failed_blinded_path_idxs(this.ptr, InternalUtils.encodeUint64Array(val)); + GC.KeepAlive(this); + GC.KeepAlive(val); + } + /** * Constructs a new PaymentParameters given each field */ - public static PaymentParameters of(org.ldk.structs.Payee payee_arg, org.ldk.structs.Option_u64Z expiry_time_arg, int max_total_cltv_expiry_delta_arg, byte max_path_count_arg, byte max_channel_saturation_power_of_half_arg, long[] previously_failed_channels_arg) { - long ret = bindings.PaymentParameters_new(payee_arg.ptr, expiry_time_arg.ptr, max_total_cltv_expiry_delta_arg, max_path_count_arg, max_channel_saturation_power_of_half_arg, InternalUtils.encodeUint64Array(previously_failed_channels_arg)); + public static PaymentParameters of(org.ldk.structs.Payee payee_arg, org.ldk.structs.Option_u64Z expiry_time_arg, int max_total_cltv_expiry_delta_arg, byte max_path_count_arg, byte max_channel_saturation_power_of_half_arg, long[] previously_failed_channels_arg, long[] previously_failed_blinded_path_idxs_arg) { + long ret = bindings.PaymentParameters_new(payee_arg.ptr, expiry_time_arg.ptr, max_total_cltv_expiry_delta_arg, max_path_count_arg, max_channel_saturation_power_of_half_arg, InternalUtils.encodeUint64Array(previously_failed_channels_arg), InternalUtils.encodeUint64Array(previously_failed_blinded_path_idxs_arg)); GC.KeepAlive(payee_arg); GC.KeepAlive(expiry_time_arg); GC.KeepAlive(max_total_cltv_expiry_delta_arg); GC.KeepAlive(max_path_count_arg); GC.KeepAlive(max_channel_saturation_power_of_half_arg); GC.KeepAlive(previously_failed_channels_arg); + GC.KeepAlive(previously_failed_blinded_path_idxs_arg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };