mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-02 19:44:03 +02:00
routing: introduce a heap to keep track of closest nodes during pathfinding
This commit introduces a new heap struct that will be used to keep track of the next closest node to the source during path finding within our modified Dijkstra's algorithm.
This commit is contained in:
@ -208,13 +208,6 @@ func newVertex(pub *btcec.PublicKey) vertex {
|
||||
return v
|
||||
}
|
||||
|
||||
// nodeWithDist is a helper struct that couples the distance from the current
|
||||
// source to a node with a pointer to the node itself.
|
||||
type nodeWithDist struct {
|
||||
dist float64
|
||||
node *channeldb.LightningNode
|
||||
}
|
||||
|
||||
// edgeWithPrev is a helper struct used in path finding that couples an
|
||||
// directional edge with the node's ID in the opposite direction.
|
||||
type edgeWithPrev struct {
|
||||
|
Reference in New Issue
Block a user