Class ReplyChannelRange


  • public class ReplyChannelRange
    extends Object
    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_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
    • Method Detail

      • get_chain_hash

        public byte[] get_chain_hash()
        The genesis hash of the blockchain being queried
      • set_chain_hash

        public void set_chain_hash​(byte[] val)
        The genesis hash of the blockchain being queried
      • get_first_blocknum

        public int get_first_blocknum()
        The height of the first block in the range of the reply
      • set_first_blocknum

        public void set_first_blocknum​(int val)
        The height of the first block in the range of the reply
      • get_number_of_blocks

        public int get_number_of_blocks()
        The number of blocks included in the range of the reply
      • set_number_of_blocks

        public void set_number_of_blocks​(int val)
        The number of blocks included in the range of the reply
      • get_sync_complete

        public boolean get_sync_complete()
        True when this is the final reply for a query
      • set_sync_complete

        public void set_sync_complete​(boolean val)
        True when this is the final reply for a query
      • get_short_channel_ids

        public long[] get_short_channel_ids()
        The `short_channel_id`s in the channel range Returns a copy of the field.
      • set_short_channel_ids

        public void set_short_channel_ids​(long[] val)
        The `short_channel_id`s in the channel range
      • of

        public static ReplyChannelRange of​(byte[] chain_hash_arg,
                                           int first_blocknum_arg,
                                           int number_of_blocks_arg,
                                           boolean sync_complete_arg,
                                           long[] short_channel_ids_arg)
        Constructs a new ReplyChannelRange given each field
      • eq

        public boolean eq​(ReplyChannelRange b)
        Checks if two ReplyChannelRanges 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.
      • write

        public byte[] write()
        Serialize the ReplyChannelRange object into a byte array which can be read by ReplyChannelRange_read