Class RouteHop


  • public class RouteHop
    extends Object
    A hop in a route
    • Method Detail

      • get_pubkey

        public byte[] get_pubkey()
        The node_id of the node at this hop.
      • set_pubkey

        public void set_pubkey​(byte[] val)
        The node_id of the node at this hop.
      • get_node_features

        public NodeFeatures get_node_features()
        The node_announcement features of the node at this hop. For the last hop, these may be amended to match the features present in the invoice this node generated.
      • set_node_features

        public void set_node_features​(NodeFeatures val)
        The node_announcement features of the node at this hop. For the last hop, these may be amended to match the features present in the invoice this node generated.
      • get_short_channel_id

        public long get_short_channel_id()
        The channel that should be used from the previous hop to reach this node.
      • set_short_channel_id

        public void set_short_channel_id​(long val)
        The channel that should be used from the previous hop to reach this node.
      • get_channel_features

        public ChannelFeatures get_channel_features()
        The channel_announcement features of the channel that should be used from the previous hop to reach this node.
      • set_channel_features

        public void set_channel_features​(ChannelFeatures val)
        The channel_announcement features of the channel that should be used from the previous hop to reach this node.
      • get_fee_msat

        public long get_fee_msat()
        The fee taken on this hop (for paying for the use of the *next* channel in the path). For the last hop, this should be the full value of the payment (might be more than requested if we had to match htlc_minimum_msat).
      • set_fee_msat

        public void set_fee_msat​(long val)
        The fee taken on this hop (for paying for the use of the *next* channel in the path). For the last hop, this should be the full value of the payment (might be more than requested if we had to match htlc_minimum_msat).
      • get_cltv_expiry_delta

        public int get_cltv_expiry_delta()
        The CLTV delta added for this hop. For the last hop, this should be the full CLTV value expected at the destination, in excess of the current block height.
      • set_cltv_expiry_delta

        public void set_cltv_expiry_delta​(int val)
        The CLTV delta added for this hop. For the last hop, this should be the full CLTV value expected at the destination, in excess of the current block height.
      • of

        public static RouteHop of​(byte[] pubkey_arg,
                                  NodeFeatures node_features_arg,
                                  long short_channel_id_arg,
                                  ChannelFeatures channel_features_arg,
                                  long fee_msat_arg,
                                  int cltv_expiry_delta_arg)
        Constructs a new RouteHop given each field
      • clone

        public RouteHop clone()
        Creates a copy of the RouteHop
        Overrides:
        clone in class Object
      • write

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