graph/db: thread context through to UpdateEdgePolicy

This commit is contained in:
Elle Mouton
2025-06-18 08:11:44 +02:00
parent 3fdb9b84f4
commit 81c063eb96
15 changed files with 94 additions and 86 deletions

View File

@@ -331,7 +331,8 @@ func (s *Server) ImportGraph(ctx context.Context,
if rpcEdge.Node1Policy != nil {
policy := makePolicy(rpcEdge.Node1Policy)
policy.ChannelFlags = 0
if err := graphDB.UpdateEdgePolicy(policy); err != nil {
err := graphDB.UpdateEdgePolicy(ctx, policy)
if err != nil {
return nil, fmt.Errorf(
"unable to update policy: %v", err)
}
@@ -340,7 +341,8 @@ func (s *Server) ImportGraph(ctx context.Context,
if rpcEdge.Node2Policy != nil {
policy := makePolicy(rpcEdge.Node2Policy)
policy.ChannelFlags = 1
if err := graphDB.UpdateEdgePolicy(policy); err != nil {
err := graphDB.UpdateEdgePolicy(ctx, policy)
if err != nil {
return nil, fmt.Errorf(
"unable to update policy: %v", err)
}