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:
Elle Mouton committed 2023-11-08 14:50:34 +02:00
1 parent 9a62a46aa3
commit 6c76d31e89
9 files changed
+38 -24

No files matched your search

+2 -2
View File
@@ -2283,7 +2283,7 @@ func TestPathFindSpecExample(t *testing.T) {
// Carol, so we set "B" as the source node so path finding starts from
// Bob.
bob := ctx.aliases["B"]
bobNode, err := ctx.graph.FetchLightningNode(bob)
bobNode, err := ctx.graph.FetchLightningNode(nil, bob)
require.NoError(t, err, "unable to find bob")
if err := ctx.graph.SetSourceNode(bobNode); err != nil {
t.Fatalf("unable to set source node: %v", err)
@@ -2332,7 +2332,7 @@ func TestPathFindSpecExample(t *testing.T) {
// Next, we'll set A as the source node so we can assert that we create
// the proper route for any queries starting with Alice.
alice := ctx.aliases["A"]
aliceNode, err := ctx.graph.FetchLightningNode(alice)
aliceNode, err := ctx.graph.FetchLightningNode(nil, alice)
require.NoError(t, err, "unable to find alice")
if err := ctx.graph.SetSourceNode(aliceNode); err != nil {
t.Fatalf("unable to set source node: %v", err)