mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-07 19:30:46 +02:00
multi: further decouple graph
To further separate the channel graph from the channel state, we refactor the AddrsForNode method to use the graphs's public methods instead of directly accessing any buckets. This makes sure that we can have the channel state cached with just its buckets while not using a kvdb level cache for the graph. At the same time we refactor the graph's test to also be less dependent upon the channel state DB.
This commit is contained in:
@@ -5539,7 +5539,7 @@ func (r *rpcServer) GetNodeInfo(ctx context.Context,
|
||||
// With the public key decoded, attempt to fetch the node corresponding
|
||||
// to this public key. If the node cannot be found, then an error will
|
||||
// be returned.
|
||||
node, err := graph.FetchLightningNode(nil, pubKey)
|
||||
node, err := graph.FetchLightningNode(pubKey)
|
||||
switch {
|
||||
case err == channeldb.ErrGraphNodeNotFound:
|
||||
return nil, status.Error(codes.NotFound, err.Error())
|
||||
|
Reference in New Issue
Block a user