refactor: create FetchLightningNode with no tx param

In preparation for adding a clean Graph DB interface, we create a
version of FetchLightningNode that doesnt allow a caller to provide in a
transaction.
This commit is contained in:
Elle Mouton
2024-06-14 20:29:26 -04:00
parent 71e93526d6
commit c20d759d41
8 changed files with 39 additions and 18 deletions

View File

@@ -6345,7 +6345,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())
@@ -7393,7 +7393,7 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
return "", err
}
peer, err := r.server.graphDB.FetchLightningNode(nil, vertex)
peer, err := r.server.graphDB.FetchLightningNode(vertex)
if err != nil {
return "", err
}