X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=1c0768518a00f41b5e92f50602559dec3cf7ba9e;hb=300b54d26fe5ed89f472ef821ebf67d56c917e49;hp=d1c885ff0a2694cc958e2429d581dad81d19bfac;hpb=d2925e24ac4643ec22eb73495f0424e27def2545;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index d1c885ff..1c076851 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -66,8 +66,8 @@ public class RoutingFees extends CommonBase { Reference.reachabilityFence(base_msat_arg); Reference.reachabilityFence(proportional_millionths_arg); if (ret >= 0 && ret <= 4096) { return null; } - RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RoutingFees(null, ret); } - ret_hu_conv.ptrs_to.add(ret_hu_conv); + org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; return ret_hu_conv; } @@ -77,10 +77,10 @@ public class RoutingFees extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(RoutingFees b) { - boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); - this.ptrs_to.add(b); + if (this != null) { this.ptrs_to.add(b); }; return ret; } @@ -101,8 +101,8 @@ public class RoutingFees extends CommonBase { long ret = bindings.RoutingFees_clone(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RoutingFees(null, ret); } - ret_hu_conv.ptrs_to.add(this); + org.ldk.structs.RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RoutingFees(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; }