X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelUpdateInfo.java;h=b485f3c006198e3ab447127ab7971b2d2e917b39;hb=300b54d26fe5ed89f472ef821ebf67d56c917e49;hp=2418490445dd14e85c9ca776ec7db77110832cf6;hpb=3c60e0fd0da579be9932801c1be2b32014c944a5;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelUpdateInfo.java b/src/main/java/org/ldk/structs/ChannelUpdateInfo.java index 24184904..b485f3c0 100644 --- a/src/main/java/org/ldk/structs/ChannelUpdateInfo.java +++ b/src/main/java/org/ldk/structs/ChannelUpdateInfo.java @@ -205,6 +205,23 @@ public class ChannelUpdateInfo extends CommonBase { return ret_hu_conv; } + /** + * Checks if two ChannelUpdateInfos contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ + public boolean eq(ChannelUpdateInfo b) { + boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + if (this != null) { this.ptrs_to.add(b); }; + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof ChannelUpdateInfo)) return false; + return this.eq((ChannelUpdateInfo)o); + } /** * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read */