Package org.ldk.structs
Class InFlightHtlcs
- java.lang.Object
-
- org.ldk.structs.InFlightHtlcs
-
public class InFlightHtlcs extends Object
A data structure for tracking in-flight HTLCs. May be used during pathfinding to account for in-use channel liquidity.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InFlightHtlcs
clone()
Creates a copy of the InFlightHtlcsprotected void
finalize()
static InFlightHtlcs
of()
Constructs an empty `InFlightHtlcs`.void
process_path(Path path, byte[] payer_node_id)
Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.static Result_InFlightHtlcsDecodeErrorZ
read(byte[] ser)
Read a InFlightHtlcs from a byte array, created by InFlightHtlcs_writeOption_u64Z
used_liquidity_msat(NodeId source, NodeId target, long channel_scid)
Returns liquidity in msat given the public key of the HTLC source, target, and short channel id.byte[]
write()
Serialize the InFlightHtlcs object into a byte array which can be read by InFlightHtlcs_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public InFlightHtlcs clone()
Creates a copy of the InFlightHtlcs
-
of
public static InFlightHtlcs of()
Constructs an empty `InFlightHtlcs`.
-
process_path
public void process_path(Path path, byte[] payer_node_id)
Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
-
used_liquidity_msat
public Option_u64Z used_liquidity_msat(NodeId source, NodeId target, long channel_scid)
Returns liquidity in msat given the public key of the HTLC source, target, and short channel id.
-
write
public byte[] write()
Serialize the InFlightHtlcs object into a byte array which can be read by InFlightHtlcs_read
-
read
public static Result_InFlightHtlcsDecodeErrorZ read(byte[] ser)
Read a InFlightHtlcs from a byte array, created by InFlightHtlcs_write
-
-