Skip to content

Commit b9d3528

Browse files
LukaszRozmejkamilchodola
authored andcommitted
Increase batch limit to 1000 (#5198)
* Increase batch limit to 1000 * fix test
1 parent c7df68c commit b9d3528

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ public async Task Can_process_batch_request_with_single_request_and_incorrect()
254254
public async Task Will_return_error_when_batch_request_is_too_large()
255255
{
256256
StringBuilder request = new();
257+
int maxBatchSize = new JsonRpcConfig().MaxBatchSize;
257258
request.Append("[");
258-
for (int i = 0; i < 101; i++)
259+
for (int i = 0; i < maxBatchSize + 1; i++)
259260
{
260261
if (i != 0) request.Append(",");
261262
request.Append(

src/Nethermind/Nethermind.JsonRpc/IJsonRpcConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public interface IJsonRpcConfig : IConfig
128128

129129
[ConfigItem(
130130
Description = "Limit batch size for batched json rpc call",
131-
DefaultValue = "100")]
131+
DefaultValue = "1000")]
132132
int MaxBatchSize { get; set; }
133133

134134
[ConfigItem(

src/Nethermind/Nethermind.JsonRpc/JsonRpcConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public int WebSocketsPort
4444
public string EngineHost { get; set; } = "127.0.0.1";
4545
public int? EnginePort { get; set; } = null;
4646
public string[] EngineEnabledModules { get; set; } = ModuleType.DefaultEngineModules.ToArray();
47-
public int MaxBatchSize { get; set; } = 100;
47+
public int MaxBatchSize { get; set; } = 1000;
4848
public long? MaxBatchResponseBodySize { get; set; } = 30.MB();
4949
};
5050
};

0 commit comments

Comments
 (0)