mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 14:57:38 +02:00
multi: let FetchLightningNode take an optional tx
In preparation for the next commit which will remove the `*LightningNode` from the `ChannelEdgePolicy` struct, `FetchLightningNode` is modified to take in an optional transaction so that it can be utilised in places where a transaction exists.
This commit is contained in:
@@ -6135,7 +6135,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(pubKey)
|
||||
node, err := graph.FetchLightningNode(nil, pubKey)
|
||||
switch {
|
||||
case err == channeldb.ErrGraphNodeNotFound:
|
||||
return nil, status.Error(codes.NotFound, err.Error())
|
||||
@@ -7107,7 +7107,7 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
|
||||
return "", err
|
||||
}
|
||||
|
||||
peer, err := r.server.graphDB.FetchLightningNode(vertex)
|
||||
peer, err := r.server.graphDB.FetchLightningNode(nil, vertex)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user