mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
channeldb: within AddrsForNode don't fail if no graph node is found
In this commit, we modify the `AddrsForNode` method to not fail if no graph node is found. We do this as when the backup is being restored/created, it's possible that we don't yet have a NodeAnnouncement for that node.
This commit is contained in:
@@ -1018,7 +1018,9 @@ func (d *DB) AddrsForNode(nodePub *btcec.PublicKey) ([]net.Addr, error) {
|
||||
}
|
||||
compressedPubKey := nodePub.SerializeCompressed()
|
||||
graphNode, err = fetchLightningNode(nodes, compressedPubKey)
|
||||
if err != nil {
|
||||
if err != nil && err != ErrGraphNodeNotFound {
|
||||
// If the node isn't found, then that's OK, as we still
|
||||
// have the link node data.
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user