routing: during path finding skip edges that are marked disabled
In this commit, we implement adherence of the disabled bit within a ChannelUpdate during path finding. If a channel is marked as disabled, then we won’t attempt to route through it. A test has been added to exercise this new check.
This commit is contained in:
2 files changed
+82
-1
No files matched your search
+7
-1
@@ -468,7 +468,13 @@ func findPath(tx *bolt.Tx, graph *channeldb.ChannelGraph,
|
||||
|
||||
v := NewVertex(outEdge.Node.PubKey)
|
||||
|
||||
// TODO(roasbeef): skip if chan disabled
|
||||
// If the outgoing edge is currently disabled, then
|
||||
// we'll stop here, as we shouldn't attempt to route
|
||||
// through it.
|
||||
edgeFlags := lnwire.ChanUpdateFlag(outEdge.Flags)
|
||||
if edgeFlags&lnwire.ChanUpdateDisabled == lnwire.ChanUpdateDisabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
// If this Vertex or edge has been black listed, then
|
||||
// we'll skip exploring this edge during this
|
||||
|
||||
Reference in new issue
Block a user