Class NodeInfo


  • public class NodeInfo
    extends Object
    Details about a node in the network, known from the network announcement.
    • Method Detail

      • get_channels

        public long[] get_channels()
        All valid channels a node has announced Returns a copy of the field.
      • set_channels

        public void set_channels​(long[] val)
        All valid channels a node has announced
      • get_announcement_info

        @Nullable
        public NodeAnnouncementInfo get_announcement_info()
        More information about a node from node_announcement. Optional because we store a Node entry after learning about it from a channel announcement, but before receiving a node announcement. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_announcement_info

        public void set_announcement_info​(@Nullable
                                          NodeAnnouncementInfo val)
        More information about a node from node_announcement. Optional because we store a Node entry after learning about it from a channel announcement, but before receiving a node announcement. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • of

        public static NodeInfo of​(long[] channels_arg,
                                  NodeAnnouncementInfo announcement_info_arg)
        Constructs a new NodeInfo given each field
      • clone

        public NodeInfo clone()
        Creates a copy of the NodeInfo
        Overrides:
        clone in class Object
      • eq

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