mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-12 23:28:31 +01:00
graph/db: thread context through to UpdateEdgePolicy
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user