X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUnsignedChannelAnnouncement.java;h=9d6bd1a4a28558e55baf0f4ff3f16c1b9a56e081;hb=2bb592fb946e316dba9f4d1123f8ac72ff4e9bf8;hp=5685619359ef515c5cffe22129718447eeb866e6;hpb=7811d2191440c55034e1abfbf3be442d4b25481b;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java index 56856193..9d6bd1a4 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java @@ -236,6 +236,18 @@ public class UnsignedChannelAnnouncement extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the UnsignedChannelAnnouncement. + */ + public long hash() { + long ret = bindings.UnsignedChannelAnnouncement_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Checks if two UnsignedChannelAnnouncements contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields.