Skip to content

Commit

Permalink
fix: Check the flow graph, not the trust graph, if nodes exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Dec 12, 2024
1 parent b7c551f commit c322c62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Circles.Index/Circles.Index.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
<Copyright>Gnosis Service GmbH</Copyright>
<Product>Circles</Product>
<AssemblyVersion>1.11.2</AssemblyVersion>
<FileVersion>1.11.2</FileVersion>
<AssemblyVersion>1.11.3</AssemblyVersion>
<FileVersion>1.11.3</FileVersion>
</PropertyGroup>


Expand Down
4 changes: 2 additions & 2 deletions Circles.Pathfinder/V2Pathfinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public async Task<MaxFlowResponse> ComputeMaxFlow(FlowRequest request)
var flowGraph = _graphFactory.CreateFlowGraph(capacityGraph);

// Validate Source and Sink
if (!trustGraph.Nodes.ContainsKey(request.Source))
if (!flowGraph.Nodes.ContainsKey(request.Source))
{
throw new ArgumentException($"Source node '{request.Source}' does not exist in the graph.");
}

if (!trustGraph.Nodes.ContainsKey(request.Sink))
if (!flowGraph.Nodes.ContainsKey(request.Sink))
{
throw new ArgumentException($"Sink node '{request.Sink}' does not exist in the graph.");
}
Expand Down

0 comments on commit c322c62

Please sign in to comment.