X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAcceptChannel.java;h=e7c4b472dd3f104b919cd5ce7a50e4e324228bf8;hb=2ed9081562d00a8645604b07629e963231d49e0f;hp=e781f87da659af429959a06cbdf0d1416747ca40;hpb=166ff04616cfee975ce991607ca0df88857193df;p=ldk-java diff --git a/src/main/java/org/ldk/structs/AcceptChannel.java b/src/main/java/org/ldk/structs/AcceptChannel.java index e781f87d..e7c4b472 100644 --- a/src/main/java/org/ldk/structs/AcceptChannel.java +++ b/src/main/java/org/ldk/structs/AcceptChannel.java @@ -11,161 +11,161 @@ public class AcceptChannel extends CommonBase { } public AcceptChannel(AcceptChannel orig) { - super(bindings.AcceptChannel_clone(orig.ptr & ~1)); + super(bindings.AcceptChannel_clone(orig == null ? 0 : orig.ptr & ~1)); this.ptrs_to.add(orig); } public byte[] get_temporary_channel_id(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_temporary_channel_id(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_temporary_channel_id(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public long get_dust_limit_satoshis(AcceptChannel this_ptr) { - long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this_ptr.ptr & ~1); + long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_dust_limit_satoshis(AcceptChannel this_ptr, long val) { - bindings.AcceptChannel_set_dust_limit_satoshis(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public long get_max_htlc_value_in_flight_msat(AcceptChannel this_ptr) { - long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1); + long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_max_htlc_value_in_flight_msat(AcceptChannel this_ptr, long val) { - bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public long get_channel_reserve_satoshis(AcceptChannel this_ptr) { - long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this_ptr.ptr & ~1); + long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_channel_reserve_satoshis(AcceptChannel this_ptr, long val) { - bindings.AcceptChannel_set_channel_reserve_satoshis(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public long get_htlc_minimum_msat(AcceptChannel this_ptr) { - long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this_ptr.ptr & ~1); + long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_htlc_minimum_msat(AcceptChannel this_ptr, long val) { - bindings.AcceptChannel_set_htlc_minimum_msat(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public int get_minimum_depth(AcceptChannel this_ptr) { - int ret = bindings.AcceptChannel_get_minimum_depth(this_ptr.ptr & ~1); + int ret = bindings.AcceptChannel_get_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_minimum_depth(AcceptChannel this_ptr, int val) { - bindings.AcceptChannel_set_minimum_depth(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public short get_to_self_delay(AcceptChannel this_ptr) { - short ret = bindings.AcceptChannel_get_to_self_delay(this_ptr.ptr & ~1); + short ret = bindings.AcceptChannel_get_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_to_self_delay(AcceptChannel this_ptr, short val) { - bindings.AcceptChannel_set_to_self_delay(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public short get_max_accepted_htlcs(AcceptChannel this_ptr) { - short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this_ptr.ptr & ~1); + short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_max_accepted_htlcs(AcceptChannel this_ptr, short val) { - bindings.AcceptChannel_set_max_accepted_htlcs(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_funding_pubkey(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_funding_pubkey(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_funding_pubkey(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_revocation_basepoint(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_revocation_basepoint(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_revocation_basepoint(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_payment_point(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_payment_point(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_payment_point(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_payment_point(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_delayed_payment_basepoint(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_delayed_payment_basepoint(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_delayed_payment_basepoint(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_htlc_basepoint(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_htlc_basepoint(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_htlc_basepoint(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); } public byte[] get_first_per_commitment_point(AcceptChannel this_ptr) { - byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this_ptr.ptr & ~1); + byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1); this.ptrs_to.add(this_ptr); return ret; } public void set_first_per_commitment_point(AcceptChannel this_ptr, byte[] val) { - bindings.AcceptChannel_set_first_per_commitment_point(this_ptr.ptr & ~1, val); + bindings.AcceptChannel_set_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); this.ptrs_to.add(this_ptr); }