DotNetLightning


Routing Module

Functions and values

Function or value Description

DEFAULT_ROUTE_MAX_CLTV

Full Usage: DEFAULT_ROUTE_MAX_CLTV

Returns: BlockHeightOffset16

Max allowed cltv for a route

Returns: BlockHeightOffset16

ROUTE_MAX_LENGTH

Full Usage: ROUTE_MAX_LENGTH

Returns: int

Defined in BOLT7

Returns: int

executeCommand state cmd

Full Usage: executeCommand state cmd

Parameters:
Returns: Result<seq<ChannelHop>, RouterError>
state : RouterState
cmd : RouterCommand
Returns: Result<seq<ChannelHop>, RouterError>

findRoute g local target amount numRoutes extraE ignoredE ignoredV routeParams currentBlockHeight

Full Usage: findRoute g local target amount numRoutes extraE ignoredE ignoredV routeParams currentBlockHeight

Parameters:
Returns: Result<seq<ChannelHop>, RouterError>

Find a route in the graph between localNodeId and targetNodeId, returns the route. Will perform a k-shortest path selection given the @param numRoutes and randomly select one of the result

g : DirectedLNGraph
local : NodeId
target : NodeId
amount : LNMoney
numRoutes : int
extraE : Set<GraphLabel>
ignoredE : Set<ChannelDesc>
ignoredV : Set<NodeId>
routeParams : RouteParams
currentBlockHeight : BlockHeight
Returns: Result<seq<ChannelHop>, RouterError>

getIgnoredChannelDesc channels ignoredNodes

Full Usage: getIgnoredChannelDesc channels ignoredNodes

Parameters:
Returns: seq<ChannelDesc>

This method is used after a payment failed, and we want to exclude some nodes that we know are failing

channels : Map<ShortChannelId, PublicChannel>
ignoredNodes : Set<NodeId>
Returns: seq<ChannelDesc>