Skip to content

Commit

Permalink
update gql management2
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Sep 18, 2023
1 parent 335b354 commit 0ed76ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 14 additions & 11 deletions NineChronicles.Headless/ActionEvaluationPublisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,21 +296,24 @@ public IdGroupFinder(IMemoryCache memoryCache)
// Step 1: Construct the adjacency list
foreach (var kvp in dict)
{
var ip = kvp.Key;
if (!adjacencyList.ContainsKey(ip))
if (kvp.Key != "1")
{
adjacencyList[ip] = new List<string>();
}

foreach (var id in kvp.Value)
{
adjacencyList[ip].Add(id);
var ip = kvp.Key;
if (!adjacencyList.ContainsKey(ip))
{
adjacencyList[ip] = new List<string>();
}

if (!adjacencyList.ContainsKey(id))
foreach (var id in kvp.Value)
{
adjacencyList[id] = new List<string>();
adjacencyList[ip].Add(id);

if (!adjacencyList.ContainsKey(id))
{
adjacencyList[id] = new List<string>();
}
adjacencyList[id].Add(ip);
}
adjacencyList[id].Add(ip);
}
}

Expand Down
2 changes: 2 additions & 0 deletions NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ action is CombinationEquipment ||
remoteIpAddress = "1";
UpdateIpSignerList(remoteIpAddress, agent);
AddClientIpInfo(agent, remoteIpAddress);
UpdateIpSignerList(remoteIp, agent);
AddClientIpInfo(agent, remoteIp);
}

_logger.Information("[GRAPHQL-REQUEST-CAPTURE] IP: {IP} Agent: {Agent} Tx: {Path}",
Expand Down

0 comments on commit 0ed76ed

Please sign in to comment.