Package org.ldk.structs
Class RouteHop
- java.lang.Object
-
- org.ldk.structs.RouteHop
-
public class RouteHop extends Object
A hop in a route
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteHop
clone()
Creates a copy of the RouteHopboolean
eq(RouteHop b)
Checks if two RouteHops contain equal inner contents.protected void
finalize()
ChannelFeatures
get_channel_features()
The channel_announcement features of the channel that should be used from the previous hop to reach this node.int
get_cltv_expiry_delta()
The CLTV delta added for this hop.long
get_fee_msat()
The fee taken on this hop (for paying for the use of the *next* channel in the path).NodeFeatures
get_node_features()
The node_announcement features of the node at this hop.byte[]
get_pubkey()
The node_id of the node at this hop.long
get_short_channel_id()
The channel that should be used from the previous hop to reach this node.long
hash()
Checks if two RouteHops contain equal inner contents.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 fieldstatic Result_RouteHopDecodeErrorZ
read(byte[] ser)
Read a RouteHop from a byte array, created by RouteHop_writevoid
set_channel_features(ChannelFeatures val)
The channel_announcement features of the channel that should be used from the previous hop to reach this node.void
set_cltv_expiry_delta(int val)
The CLTV delta added for this hop.void
set_fee_msat(long val)
The fee taken on this hop (for paying for the use of the *next* channel in the path).void
set_node_features(NodeFeatures val)
The node_announcement features of the node at this hop.void
set_pubkey(byte[] val)
The node_id of the node at this hop.void
set_short_channel_id(long val)
The channel that should be used from the previous hop to reach this node.byte[]
write()
Serialize the RouteHop object into a byte array which can be read by RouteHop_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
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
-
hash
public long hash()
Checks if two RouteHops contain equal inner contents.
-
eq
public boolean eq(RouteHop b)
Checks if two RouteHops 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 RouteHop object into a byte array which can be read by RouteHop_read
-
read
public static Result_RouteHopDecodeErrorZ read(byte[] ser)
Read a RouteHop from a byte array, created by RouteHop_write
-
-