X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FReplyChannelRange.java;h=10ca61a3c511c876873c1c270abd9791d23b9288;hb=7b75443b8305c6a24d3c08520e1785e9d39960e4;hp=2799bedae50d4c25d1c02f613256d6731100c63f;hpb=330ca992be304d0eac79bd59b411980dff294b03;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ReplyChannelRange.java b/src/main/java/org/ldk/structs/ReplyChannelRange.java index 2799beda..10ca61a3 100644 --- a/src/main/java/org/ldk/structs/ReplyChannelRange.java +++ b/src/main/java/org/ldk/structs/ReplyChannelRange.java @@ -9,13 +9,17 @@ import javax.annotation.Nullable; /** - * A reply_channel_range message is a reply to a query_channel_range - * message. Multiple reply_channel_range messages can be sent in reply - * to a single query_channel_range message. The query recipient makes a + * A [`reply_channel_range`] message is a reply to a [`QueryChannelRange`] + * message. + * + * Multiple `reply_channel_range` messages can be sent in reply + * to a single [`QueryChannelRange`] message. The query recipient makes a * best effort to respond based on their local network view which may - * not be a perfect view of the network. The short_channel_ids in the - * reply are encoded. We only support encoding_type=0 uncompressed - * serialization and do not support encoding_type=1 zlib serialization. + * not be a perfect view of the network. The `short_channel_id`s in the + * reply are encoded. We only support `encoding_type=0` uncompressed + * serialization and do not support `encoding_type=1` zlib serialization. + * + * [`reply_channel_range`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-query_channel_range-and-reply_channel_range-messages */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class ReplyChannelRange extends CommonBase { @@ -99,7 +103,7 @@ public class ReplyChannelRange extends CommonBase { } /** - * The short_channel_ids in the channel range + * The `short_channel_id`s in the channel range * * Returns a copy of the field. */ @@ -110,7 +114,7 @@ public class ReplyChannelRange extends CommonBase { } /** - * The short_channel_ids in the channel range + * The `short_channel_id`s in the channel range */ public void set_short_channel_ids(long[] val) { bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val); @@ -152,6 +156,18 @@ public class ReplyChannelRange extends CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the ReplyChannelRange. + */ + public long hash() { + long ret = bindings.ReplyChannelRange_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } /** * Checks if two ReplyChannelRanges contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields.