Class QueryChannelRange


  • public class QueryChannelRange
    extends Object
    A query_channel_range message is used to query a peer for channel UTXOs in a range of blocks. The recipient of a query makes a best effort to reply to the query using one or more 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 for the channel UTXOs being queried
      • set_first_blocknum

        public void set_first_blocknum​(int val)
        The height of the first block for the channel UTXOs being queried
      • get_number_of_blocks

        public int get_number_of_blocks()
        The number of blocks to include in the query results
      • set_number_of_blocks

        public void set_number_of_blocks​(int val)
        The number of blocks to include in the query results
      • of

        public static QueryChannelRange of​(byte[] chain_hash_arg,
                                           int first_blocknum_arg,
                                           int number_of_blocks_arg)
        Constructs a new QueryChannelRange given each field
      • end_blocknum

        public int end_blocknum()
        \n\t * Calculates the overflow safe ending block height for the query.\n\t * Overflow returns `0xffffffff`, otherwise returns `first_blocknum + number_of_blocks`\n\t
      • write

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