mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-18 10:06:51 +01:00
graph+lnd: add various calls to GraphSource
In this commit, we add a bunch of graph methods to the GraphSource, let DBSource implement it and then we use the graph source for these methods for the GetNodeInfo, VerifyMessage, DescribeGraph, GetNodeMetrics, GetChanInfo and GetNodeInfo RPC calls along with peer alias lookup.
This commit is contained in:
@@ -4962,12 +4962,14 @@ var errNoAdvertisedAddr = errors.New("no advertised address found")
|
||||
|
||||
// fetchNodeAdvertisedAddrs attempts to fetch the advertised addresses of a node.
|
||||
func (s *server) fetchNodeAdvertisedAddrs(pub *btcec.PublicKey) ([]net.Addr, error) {
|
||||
ctx := context.TODO()
|
||||
|
||||
vertex, err := route.NewVertexFromBytes(pub.SerializeCompressed())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
node, err := s.graphDB.FetchLightningNode(vertex)
|
||||
node, err := s.graphSource.FetchLightningNode(ctx, vertex)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user