Type/Module | Description |
Function or value | Description |
Full Usage:
dijkstraShortestPath g sourceNode targetNode ignoredEdges ignoredVertices extraEdges initialWeight boundaries currentBlockHeight wr
Parameters:
DirectedLNGraph
sourceNode : NodeId
targetNode : NodeId
ignoredEdges : Set<ChannelDesc>
ignoredVertices : Set<NodeId>
extraEdges : Set<GraphLabel>
initialWeight : RichWeight
boundaries : RichWeight -> bool
currentBlockHeight : BlockHeight
wr : WeightRatios option
Returns: seq<GraphLabel>
|
Finds the shortest path in the graph, uses a modified version of Dijkstra's algorithm that computes the shortest path from the target to the source (this is because we ) The graph on which will be performed the search The starting node of the path we're looking for The destination node of the path a list of edges we do not want to consider a list of extra edges we want to consider but are not currently in the graph an object containing the ratios used to 'weight' edges when searching for the shortest path the height of the chain tip (latest block) a predicate function that can used to impose limits
|
Full Usage:
pathWeight path amount isPartial currentBlockHeight wr
Parameters:
seq<GraphLabel>
amount : LNMoney
isPartial : bool
currentBlockHeight : BlockHeight
wr : WeightRatios option
Returns: RichWeight
|
Calculates the total cost of a path (amount + fees), direct channels with the source will have a cost of 0 (pay no fees)
|
Full Usage:
yenKShortestPaths g sourceNode targetNode amount ignoredEdges ignoredVertices extraEdges pathsToFind wr currentBlockHeight boundaries
Parameters:
DirectedLNGraph
sourceNode : NodeId
targetNode : NodeId
amount : LNMoney
ignoredEdges : Set<ChannelDesc>
ignoredVertices : Set<NodeId>
extraEdges : Set<GraphLabel>
pathsToFind : int
wr : WeightRatios option
currentBlockHeight : BlockHeight
boundaries : RichWeight -> bool
Returns: ResizeArray<WeightedPath>
|
|