File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ func (graph *SimpleGraph) shortestPathLengths(node int) map[int]uint32 {
132
132
// thisLevel contains the nodes that are explored in the round.
133
133
thisLevel := make ([]int , 0 , graphOrder )
134
134
135
+ // Abort if we have an empty graph.
136
+ if len (graph .Adj ) == 0 {
137
+ return seen
138
+ }
139
+
135
140
// We discover other nodes in a ring-like structure as long as we don't
136
141
// have more nodes to explore.
137
142
for len (nextLevel ) > 0 {
Original file line number Diff line number Diff line change @@ -185,6 +185,9 @@ from occurring that would result in an erroneous force close.](https://github.co
185
185
186
186
* [ Fixes a bug that would cause ` SignPsbt ` to panic w/ an underspecified packet] ( https://github.com/lightningnetwork/lnd/pull/6611 )
187
187
188
+ * [ Fixes a panic in the graph diameter calculation if the graph is
189
+ empty] ( https://github.com/lightningnetwork/lnd/pull/6647 ) .
190
+
188
191
## Routing
189
192
190
193
* [ Add a new ` time_pref ` parameter to the QueryRoutes and SendPayment APIs] ( https://github.com/lightningnetwork/lnd/pull/6024 ) that
You can’t perform that action at this time.
0 commit comments