X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FNodeInfo.java;h=d65f4332768981b59f0a787b196181c35a417dc0;hb=ffdd56c967087cba7548599934585b8a9a3102e2;hp=e1617e846f53b1ffd4a75b086e3f3b106665f97c;hpb=7b75443b8305c6a24d3c08520e1785e9d39960e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/NodeInfo.java b/src/main/java/org/ldk/structs/NodeInfo.java index e1617e84..d65f4332 100644 --- a/src/main/java/org/ldk/structs/NodeInfo.java +++ b/src/main/java/org/ldk/structs/NodeInfo.java @@ -111,7 +111,7 @@ public class NodeInfo extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public boolean eq(org.ldk.structs.NodeInfo b) { - boolean ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.NodeInfo_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); if (this != null) { this.ptrs_to.add(b); }; @@ -122,6 +122,15 @@ public class NodeInfo extends CommonBase { if (!(o instanceof NodeInfo)) return false; return this.eq((NodeInfo)o); } + /** + * Returns whether the node has only announced Tor addresses. + */ + public boolean is_tor_only() { + boolean ret = bindings.NodeInfo_is_tor_only(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read */