44import org .ldk .enums .*;
55import org .ldk .util .*;
66import java .util .Arrays ;
7+ import java .lang .ref .Reference ;
78import javax .annotation .Nullable ;
89
910
@@ -24,6 +25,7 @@ protected void finalize() throws Throwable {
2425 */
2526 public byte [] get_temporary_channel_id () {
2627 byte [] ret = bindings .AcceptChannel_get_temporary_channel_id (this .ptr );
28+ Reference .reachabilityFence (this );
2729 return ret ;
2830 }
2931
@@ -32,13 +34,16 @@ public byte[] get_temporary_channel_id() {
3234 */
3335 public void set_temporary_channel_id (byte [] val ) {
3436 bindings .AcceptChannel_set_temporary_channel_id (this .ptr , InternalUtils .check_arr_len (val , 32 ));
37+ Reference .reachabilityFence (this );
38+ Reference .reachabilityFence (val );
3539 }
3640
3741 /**
3842 * The threshold below which outputs on transactions broadcast by sender will be omitted
3943 */
4044 public long get_dust_limit_satoshis () {
4145 long ret = bindings .AcceptChannel_get_dust_limit_satoshis (this .ptr );
46+ Reference .reachabilityFence (this );
4247 return ret ;
4348 }
4449
@@ -47,13 +52,16 @@ public long get_dust_limit_satoshis() {
4752 */
4853 public void set_dust_limit_satoshis (long val ) {
4954 bindings .AcceptChannel_set_dust_limit_satoshis (this .ptr , val );
55+ Reference .reachabilityFence (this );
56+ Reference .reachabilityFence (val );
5057 }
5158
5259 /**
5360 * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
5461 */
5562 public long get_max_htlc_value_in_flight_msat () {
5663 long ret = bindings .AcceptChannel_get_max_htlc_value_in_flight_msat (this .ptr );
64+ Reference .reachabilityFence (this );
5765 return ret ;
5866 }
5967
@@ -62,13 +70,16 @@ public long get_max_htlc_value_in_flight_msat() {
6270 */
6371 public void set_max_htlc_value_in_flight_msat (long val ) {
6472 bindings .AcceptChannel_set_max_htlc_value_in_flight_msat (this .ptr , val );
73+ Reference .reachabilityFence (this );
74+ Reference .reachabilityFence (val );
6575 }
6676
6777 /**
6878 * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
6979 */
7080 public long get_channel_reserve_satoshis () {
7181 long ret = bindings .AcceptChannel_get_channel_reserve_satoshis (this .ptr );
82+ Reference .reachabilityFence (this );
7283 return ret ;
7384 }
7485
@@ -77,13 +88,16 @@ public long get_channel_reserve_satoshis() {
7788 */
7889 public void set_channel_reserve_satoshis (long val ) {
7990 bindings .AcceptChannel_set_channel_reserve_satoshis (this .ptr , val );
91+ Reference .reachabilityFence (this );
92+ Reference .reachabilityFence (val );
8093 }
8194
8295 /**
8396 * The minimum HTLC size incoming to sender, in milli-satoshi
8497 */
8598 public long get_htlc_minimum_msat () {
8699 long ret = bindings .AcceptChannel_get_htlc_minimum_msat (this .ptr );
100+ Reference .reachabilityFence (this );
87101 return ret ;
88102 }
89103
@@ -92,13 +106,16 @@ public long get_htlc_minimum_msat() {
92106 */
93107 public void set_htlc_minimum_msat (long val ) {
94108 bindings .AcceptChannel_set_htlc_minimum_msat (this .ptr , val );
109+ Reference .reachabilityFence (this );
110+ Reference .reachabilityFence (val );
95111 }
96112
97113 /**
98114 * Minimum depth of the funding transaction before the channel is considered open
99115 */
100116 public int get_minimum_depth () {
101117 int ret = bindings .AcceptChannel_get_minimum_depth (this .ptr );
118+ Reference .reachabilityFence (this );
102119 return ret ;
103120 }
104121
@@ -107,13 +124,16 @@ public int get_minimum_depth() {
107124 */
108125 public void set_minimum_depth (int val ) {
109126 bindings .AcceptChannel_set_minimum_depth (this .ptr , val );
127+ Reference .reachabilityFence (this );
128+ Reference .reachabilityFence (val );
110129 }
111130
112131 /**
113132 * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
114133 */
115134 public short get_to_self_delay () {
116135 short ret = bindings .AcceptChannel_get_to_self_delay (this .ptr );
136+ Reference .reachabilityFence (this );
117137 return ret ;
118138 }
119139
@@ -122,13 +142,16 @@ public short get_to_self_delay() {
122142 */
123143 public void set_to_self_delay (short val ) {
124144 bindings .AcceptChannel_set_to_self_delay (this .ptr , val );
145+ Reference .reachabilityFence (this );
146+ Reference .reachabilityFence (val );
125147 }
126148
127149 /**
128150 * The maximum number of inbound HTLCs towards sender
129151 */
130152 public short get_max_accepted_htlcs () {
131153 short ret = bindings .AcceptChannel_get_max_accepted_htlcs (this .ptr );
154+ Reference .reachabilityFence (this );
132155 return ret ;
133156 }
134157
@@ -137,13 +160,16 @@ public short get_max_accepted_htlcs() {
137160 */
138161 public void set_max_accepted_htlcs (short val ) {
139162 bindings .AcceptChannel_set_max_accepted_htlcs (this .ptr , val );
163+ Reference .reachabilityFence (this );
164+ Reference .reachabilityFence (val );
140165 }
141166
142167 /**
143168 * The sender's key controlling the funding transaction
144169 */
145170 public byte [] get_funding_pubkey () {
146171 byte [] ret = bindings .AcceptChannel_get_funding_pubkey (this .ptr );
172+ Reference .reachabilityFence (this );
147173 return ret ;
148174 }
149175
@@ -152,13 +178,16 @@ public byte[] get_funding_pubkey() {
152178 */
153179 public void set_funding_pubkey (byte [] val ) {
154180 bindings .AcceptChannel_set_funding_pubkey (this .ptr , InternalUtils .check_arr_len (val , 33 ));
181+ Reference .reachabilityFence (this );
182+ Reference .reachabilityFence (val );
155183 }
156184
157185 /**
158186 * Used to derive a revocation key for transactions broadcast by counterparty
159187 */
160188 public byte [] get_revocation_basepoint () {
161189 byte [] ret = bindings .AcceptChannel_get_revocation_basepoint (this .ptr );
190+ Reference .reachabilityFence (this );
162191 return ret ;
163192 }
164193
@@ -167,13 +196,16 @@ public byte[] get_revocation_basepoint() {
167196 */
168197 public void set_revocation_basepoint (byte [] val ) {
169198 bindings .AcceptChannel_set_revocation_basepoint (this .ptr , InternalUtils .check_arr_len (val , 33 ));
199+ Reference .reachabilityFence (this );
200+ Reference .reachabilityFence (val );
170201 }
171202
172203 /**
173204 * A payment key to sender for transactions broadcast by counterparty
174205 */
175206 public byte [] get_payment_point () {
176207 byte [] ret = bindings .AcceptChannel_get_payment_point (this .ptr );
208+ Reference .reachabilityFence (this );
177209 return ret ;
178210 }
179211
@@ -182,13 +214,16 @@ public byte[] get_payment_point() {
182214 */
183215 public void set_payment_point (byte [] val ) {
184216 bindings .AcceptChannel_set_payment_point (this .ptr , InternalUtils .check_arr_len (val , 33 ));
217+ Reference .reachabilityFence (this );
218+ Reference .reachabilityFence (val );
185219 }
186220
187221 /**
188222 * Used to derive a payment key to sender for transactions broadcast by sender
189223 */
190224 public byte [] get_delayed_payment_basepoint () {
191225 byte [] ret = bindings .AcceptChannel_get_delayed_payment_basepoint (this .ptr );
226+ Reference .reachabilityFence (this );
192227 return ret ;
193228 }
194229
@@ -197,13 +232,16 @@ public byte[] get_delayed_payment_basepoint() {
197232 */
198233 public void set_delayed_payment_basepoint (byte [] val ) {
199234 bindings .AcceptChannel_set_delayed_payment_basepoint (this .ptr , InternalUtils .check_arr_len (val , 33 ));
235+ Reference .reachabilityFence (this );
236+ Reference .reachabilityFence (val );
200237 }
201238
202239 /**
203240 * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
204241 */
205242 public byte [] get_htlc_basepoint () {
206243 byte [] ret = bindings .AcceptChannel_get_htlc_basepoint (this .ptr );
244+ Reference .reachabilityFence (this );
207245 return ret ;
208246 }
209247
@@ -212,13 +250,16 @@ public byte[] get_htlc_basepoint() {
212250 */
213251 public void set_htlc_basepoint (byte [] val ) {
214252 bindings .AcceptChannel_set_htlc_basepoint (this .ptr , InternalUtils .check_arr_len (val , 33 ));
253+ Reference .reachabilityFence (this );
254+ Reference .reachabilityFence (val );
215255 }
216256
217257 /**
218258 * The first to-be-broadcast-by-sender transaction's per commitment point
219259 */
220260 public byte [] get_first_per_commitment_point () {
221261 byte [] ret = bindings .AcceptChannel_get_first_per_commitment_point (this .ptr );
262+ Reference .reachabilityFence (this );
222263 return ret ;
223264 }
224265
@@ -227,10 +268,13 @@ public byte[] get_first_per_commitment_point() {
227268 */
228269 public void set_first_per_commitment_point (byte [] val ) {
229270 bindings .AcceptChannel_set_first_per_commitment_point (this .ptr , InternalUtils .check_arr_len (val , 33 ));
271+ Reference .reachabilityFence (this );
272+ Reference .reachabilityFence (val );
230273 }
231274
232275 long clone_ptr () {
233276 long ret = bindings .AcceptChannel_clone_ptr (this .ptr );
277+ Reference .reachabilityFence (this );
234278 return ret ;
235279 }
236280
@@ -239,6 +283,7 @@ long clone_ptr() {
239283 */
240284 public AcceptChannel clone () {
241285 long ret = bindings .AcceptChannel_clone (this .ptr );
286+ Reference .reachabilityFence (this );
242287 if (ret >= 0 && ret <= 4096 ) { return null ; }
243288 AcceptChannel ret_hu_conv = null ; if (ret < 0 || ret > 4096 ) { ret_hu_conv = new AcceptChannel (null , ret ); }
244289 ret_hu_conv .ptrs_to .add (this );
@@ -250,6 +295,7 @@ public AcceptChannel clone() {
250295 */
251296 public byte [] write () {
252297 byte [] ret = bindings .AcceptChannel_write (this .ptr );
298+ Reference .reachabilityFence (this );
253299 return ret ;
254300 }
255301
@@ -258,6 +304,7 @@ public byte[] write() {
258304 */
259305 public static Result_AcceptChannelDecodeErrorZ read (byte [] ser ) {
260306 long ret = bindings .AcceptChannel_read (ser );
307+ Reference .reachabilityFence (ser );
261308 if (ret >= 0 && ret <= 4096 ) { return null ; }
262309 Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ .constr_from_ptr (ret );
263310 return ret_hu_conv ;
0 commit comments