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:
parent
b93ff26265
commit
19ef4bbcb9
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user