X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FClosingSignedFeeRange.java;h=7d17307ed579ee086abe995cbf4c063f566d3f92;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=0dbbf6c74892767ebc3dd3316598bdbf249d0d6a;hpb=d92b9f26eda1f6c1fbb970db797a03fac62c5606;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java index 0dbbf6c7..7d17307e 100644 --- a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java +++ b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java @@ -60,19 +60,24 @@ public class ClosingSignedFeeRange extends CommonBase { */ public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) { long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg); - if (ret < 1024) { return null; } - ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret); + if (ret >= 0 && ret <= 4096) { return null; } + ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); } ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } + long clone_ptr() { + long ret = bindings.ClosingSignedFeeRange_clone_ptr(this.ptr); + return ret; + } + /** * Creates a copy of the ClosingSignedFeeRange */ public ClosingSignedFeeRange clone() { long ret = bindings.ClosingSignedFeeRange_clone(this.ptr); - if (ret < 1024) { return null; } - ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret); + if (ret >= 0 && ret <= 4096) { return null; } + ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -90,7 +95,7 @@ public class ClosingSignedFeeRange extends CommonBase { */ public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) { long ret = bindings.ClosingSignedFeeRange_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }