X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FNetAddress.java;h=5a26a2a0f11525c62ecc5714ccbb9979f3a7a77c;hb=c6bac88847b7c09560af81f00ba8dd3c2ebe3a19;hp=2a2539543f919227cdcb95b0aceb4356251c7d98;hpb=0d48e557e83ef085cc92c2de63b9c81c061ce78c;p=ldk-java diff --git a/src/main/java/org/ldk/structs/NetAddress.java b/src/main/java/org/ldk/structs/NetAddress.java index 2a253954..5a26a2a0 100644 --- a/src/main/java/org/ldk/structs/NetAddress.java +++ b/src/main/java/org/ldk/structs/NetAddress.java @@ -110,7 +110,7 @@ public class NetAddress extends CommonBase { */ public NetAddress clone() { long ret = bindings.NetAddress_clone(this.ptr); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -121,7 +121,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress ipv4(byte[] addr, short port) { long ret = bindings.NetAddress_ipv4(addr, port); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -132,7 +132,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress ipv6(byte[] addr, short port) { long ret = bindings.NetAddress_ipv6(addr, port); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -143,7 +143,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress onion_v2(byte[] addr, short port) { long ret = bindings.NetAddress_onion_v2(addr, port); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -154,7 +154,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port) { long ret = bindings.NetAddress_onion_v3(ed25519_pubkey, checksum, version, port); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -173,7 +173,7 @@ public class NetAddress extends CommonBase { */ public static Result_NetAddressDecodeErrorZ read(byte[] ser) { long ret = bindings.NetAddress_read(ser); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }