From 5ebe70a7084daed36814f957c191d856edfb804d Mon Sep 17 00:00:00 2001 From: area363 Date: Mon, 11 Sep 2023 11:53:50 +0900 Subject: [PATCH] update interval --- NineChronicles.Headless/Middleware/GrpcCaptureMiddleware.cs | 6 +++--- NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NineChronicles.Headless/Middleware/GrpcCaptureMiddleware.cs b/NineChronicles.Headless/Middleware/GrpcCaptureMiddleware.cs index 4da5b5efd..b18fba078 100644 --- a/NineChronicles.Headless/Middleware/GrpcCaptureMiddleware.cs +++ b/NineChronicles.Headless/Middleware/GrpcCaptureMiddleware.cs @@ -14,8 +14,8 @@ namespace NineChronicles.Headless.Middleware { public class GrpcCaptureMiddleware : Interceptor { - private const int MultiAccountManagementTime = 10; - private const int MultiAccountTxInterval = 10; + private const int MultiAccountManagementTime = 15; + private const int MultiAccountTxInterval = 15; private static Dictionary _multiAccountTxIntervalTracker = new(); private static Dictionary _multiAccountList = new(); private readonly ILogger _logger; @@ -125,7 +125,7 @@ public override async Task UnaryServerHandler( } var agent = tx.Signer; - if (_ipSignerList[ipAddress].Count > 49) + if (_ipSignerList[ipAddress].Count > 29) { if (!_multiAccountList.ContainsKey(agent)) { diff --git a/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs b/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs index a4d5be231..8f1dd7f80 100644 --- a/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs +++ b/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs @@ -14,8 +14,8 @@ namespace NineChronicles.Headless.Middleware { public class HttpCaptureMiddleware { - private const int MultiAccountManagementTime = 10; - private const int MultiAccountTxInterval = 10; + private const int MultiAccountManagementTime = 15; + private const int MultiAccountTxInterval = 15; private static Dictionary _multiAccountTxIntervalTracker = new(); private static Dictionary _multiAccountList = new(); private readonly RequestDelegate _next; @@ -85,7 +85,7 @@ public async Task InvokeAsync(HttpContext context) var agent = tx.Signer; if (_ipSignerList.ContainsKey(context.Connection.RemoteIpAddress!.ToString())) { - if (_ipSignerList[context.Connection.RemoteIpAddress!.ToString()].Count > 49) + if (_ipSignerList[context.Connection.RemoteIpAddress!.ToString()].Count > 29) { if (!_multiAccountList.ContainsKey(agent)) {