Class GossipTimestampFilter


  • public class GossipTimestampFilter
    extends Object
    A [`gossip_timestamp_filter`] message is used by a node to request gossip relay for messages in the requested time range when the `gossip_queries` feature has been negotiated. [`gossip_timestamp_filter`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-gossip_timestamp_filter-message
    • Method Detail

      • get_chain_hash

        public byte[] get_chain_hash()
        The genesis hash of the blockchain for channel and node information
      • set_chain_hash

        public void set_chain_hash​(byte[] val)
        The genesis hash of the blockchain for channel and node information
      • get_first_timestamp

        public int get_first_timestamp()
        The starting unix timestamp
      • set_first_timestamp

        public void set_first_timestamp​(int val)
        The starting unix timestamp
      • get_timestamp_range

        public int get_timestamp_range()
        The range of information in seconds
      • set_timestamp_range

        public void set_timestamp_range​(int val)
        The range of information in seconds
      • of

        public static GossipTimestampFilter of​(byte[] chain_hash_arg,
                                               int first_timestamp_arg,
                                               int timestamp_range_arg)
        Constructs a new GossipTimestampFilter given each field
      • eq

        public boolean eq​(GossipTimestampFilter b)
        Checks if two GossipTimestampFilters 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 GossipTimestampFilter object into a byte array which can be read by GossipTimestampFilter_read