Class 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 Detail

      • 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