mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
routing: fix nil pointer panic when node has no outgoing channels
This commit is contained in:
parent
7a36fb4562
commit
0c7fcb1755
@ -295,7 +295,7 @@ func findRoute(graph *channeldb.ChannelGraph, target *btcec.PublicKey,
|
||||
|
||||
// If we've reached our target, then we're done here and can
|
||||
// exit the graph traversal early.
|
||||
if bestNode.PubKey.IsEqual(target) {
|
||||
if bestNode == nil || bestNode.PubKey.IsEqual(target) {
|
||||
break
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user