]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/ChannelConfig.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / ChannelConfig.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 ChannelConfig extends CommonBase {
10         ChannelConfig(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.ChannelConfig_free(ptr); }
15         }
16
17         public static ChannelConfig constructor_clone(ChannelConfig orig) {
18                 long ret = bindings.ChannelConfig_clone(orig == null ? 0 : orig.ptr & ~1);
19                 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public int get_fee_proportional_millionths() {
25                 int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
26                 return ret;
27         }
28
29         public void set_fee_proportional_millionths(int val) {
30                 bindings.ChannelConfig_set_fee_proportional_millionths(this.ptr, val);
31         }
32
33         public boolean get_announced_channel() {
34                 boolean ret = bindings.ChannelConfig_get_announced_channel(this.ptr);
35                 return ret;
36         }
37
38         public void set_announced_channel(boolean val) {
39                 bindings.ChannelConfig_set_announced_channel(this.ptr, val);
40         }
41
42         public boolean get_commit_upfront_shutdown_pubkey() {
43                 boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this.ptr);
44                 return ret;
45         }
46
47         public void set_commit_upfront_shutdown_pubkey(boolean val) {
48                 bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this.ptr, val);
49         }
50
51         public static ChannelConfig constructor_new(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) {
52                 long ret = bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
53                 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
54                 return ret_hu_conv;
55         }
56
57         public static ChannelConfig constructor_default() {
58                 long ret = bindings.ChannelConfig_default();
59                 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
60                 return ret_hu_conv;
61         }
62
63         public byte[] write(ChannelConfig obj) {
64                 byte[] ret = bindings.ChannelConfig_write(obj == null ? 0 : obj.ptr & ~1);
65                 this.ptrs_to.add(obj);
66                 return ret;
67         }
68
69         public static ChannelConfig constructor_read(byte[] ser) {
70                 long ret = bindings.ChannelConfig_read(ser);
71                 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
72                 return ret_hu_conv;
73         }
74
75 }