mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-02 19:44:03 +02:00
routing: fix nil pointer panic when node has no outgoing channels
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user