]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/RouteHint.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / RouteHint.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class RouteHint extends CommonBase {
10         RouteHint(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.RouteHint_free(ptr); }
15         }
16
17         public static RouteHint constructor_clone(RouteHint orig) {
18                 long ret = bindings.RouteHint_clone(orig == null ? 0 : orig.ptr & ~1);
19                 RouteHint ret_hu_conv = new RouteHint(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public byte[] get_src_node_id() {
25                 byte[] ret = bindings.RouteHint_get_src_node_id(this.ptr);
26                 return ret;
27         }
28
29         public void set_src_node_id(byte[] val) {
30                 bindings.RouteHint_set_src_node_id(this.ptr, val);
31         }
32
33         public long get_short_channel_id() {
34                 long ret = bindings.RouteHint_get_short_channel_id(this.ptr);
35                 return ret;
36         }
37
38         public void set_short_channel_id(long val) {
39                 bindings.RouteHint_set_short_channel_id(this.ptr, val);
40         }
41
42         public RoutingFees get_fees() {
43                 long ret = bindings.RouteHint_get_fees(this.ptr);
44                 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
45                 return ret_hu_conv;
46         }
47
48         public void set_fees(RoutingFees val) {
49                 bindings.RouteHint_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
50                 this.ptrs_to.add(val);
51         }
52
53         public short get_cltv_expiry_delta() {
54                 short ret = bindings.RouteHint_get_cltv_expiry_delta(this.ptr);
55                 return ret;
56         }
57
58         public void set_cltv_expiry_delta(short val) {
59                 bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
60         }
61
62         public long get_htlc_minimum_msat() {
63                 long ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
64                 return ret;
65         }
66
67         public void set_htlc_minimum_msat(long val) {
68                 bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val);
69         }
70
71         public static RouteHint constructor_new(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
72                 long ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
73                 RouteHint ret_hu_conv = new RouteHint(null, ret);
74                 ret_hu_conv.ptrs_to.add(fees_arg);
75                 return ret_hu_conv;
76         }
77
78 }