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:
9 files changed
+38
-24
No files matched your search
@@ -1613,14 +1613,14 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
|
||||
_, _, err = ctx.router.FindRoute(req)
|
||||
require.NoError(t, err, "unable to find any routes")
|
||||
|
||||
copy1, err := ctx.graph.FetchLightningNode(pub1)
|
||||
copy1, err := ctx.graph.FetchLightningNode(nil, pub1)
|
||||
require.NoError(t, err, "unable to fetch node")
|
||||
|
||||
if copy1.Alias != n1.Alias {
|
||||
t.Fatalf("fetched node not equal to original")
|
||||
}
|
||||
|
||||
copy2, err := ctx.graph.FetchLightningNode(pub2)
|
||||
copy2, err := ctx.graph.FetchLightningNode(nil, pub2)
|
||||
require.NoError(t, err, "unable to fetch node")
|
||||
|
||||
if copy2.Alias != n2.Alias {
|
||||
|
||||
Reference in new issue
Block a user