graph/db: thread context to AddChannelEdge

This commit is contained in:
Elle Mouton committed 2025-06-19 14:47:41 +02:00
1 parent 7ba4051cfd
commit 3fdb9b84f4
16 files changed
+94 -85

No files matched your search

+2 -2
View File
@@ -356,7 +356,7 @@ func parseTestGraph(t *testing.T, useCache bool, path string) (
),
}
err = graph.AddChannelEdge(&edgeInfo)
err = graph.AddChannelEdge(ctx, &edgeInfo)
if err != nil && !errors.Is(err, graphdb.ErrEdgeAlreadyExist) {
return nil, err
}
@@ -666,7 +666,7 @@ func createTestGraphFromChannels(t *testing.T, useCache bool,
BitcoinKey2Bytes: node2Vertex,
}
err = graph.AddChannelEdge(&edgeInfo)
err = graph.AddChannelEdge(ctx, &edgeInfo)
if err != nil && !errors.Is(err, graphdb.ErrEdgeAlreadyExist) {
return nil, err
}
+2 -2
View File
@@ -2744,7 +2744,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
BitcoinKey2Bytes: pub2,
AuthProof: nil,
}
require.NoError(t, ctx.graph.AddChannelEdge(edge))
require.NoError(t, ctx.graph.AddChannelEdge(ctxb, edge))
// We must add the edge policy to be able to use the edge for route
// finding.
@@ -2824,7 +2824,7 @@ func TestAddEdgeUnknownVertexes(t *testing.T) {
copy(edge.BitcoinKey1Bytes[:], node1Bytes)
edge.BitcoinKey2Bytes = node2Bytes
require.NoError(t, ctx.graph.AddChannelEdge(edge))
require.NoError(t, ctx.graph.AddChannelEdge(ctxb, edge))
edgePolicy = &models.ChannelEdgePolicy{
SigBytes: testSig.Serialize(),