Skip to content

Commit 44266d6

Browse files
committed
optimze config file
1 parent 2f2e11a commit 44266d6

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

common/src/main/resources/reference.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ node {
398398
# Maximum topics within a topic criteria, >0 otherwise no limit
399399
maxSubTopics = 1000
400400

401-
# Maximum number for blockFilter
401+
# Maximum number for blockFilter. >0 otherwise no limit
402402
maxBlockFilterNum = 50000
403403

404404
# Maximum number of concurrent eth_newFilter registrations, >0 otherwise no limit

framework/src/main/resources/config.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ node {
373373
# The maximum number of allowed topics within a topic criteria, default value is 1000,
374374
# should be > 0, otherwise means no limit.
375375
maxSubTopics = 1000
376-
# Allowed maximum number for blockFilter
376+
# Allowed maximum number for blockFilter, >0 otherwise no limit
377377
maxBlockFilterNum = 50000
378378
# Allowed maximum number for newFilter, >0 otherwise no limit
379379
maxLogFilterNum = 20000

framework/src/test/java/org/tron/core/jsonrpc/LogMatchOverLimitTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.tron.core.jsonrpc;
22

3+
import static org.junit.Assert.assertThrows;
34
import static org.mockito.ArgumentMatchers.anyLong;
45
import static org.mockito.Mockito.mock;
56
import static org.mockito.Mockito.when;
@@ -118,19 +119,14 @@ public void testAtExactLimit_succeeds()
118119
*/
119120
@Test
120121
public void testExceedsLimit_throwsBeforeAddAll()
121-
throws BadItemException, ItemNotFoundException, JsonRpcInvalidParamsException {
122+
throws ItemNotFoundException, JsonRpcInvalidParamsException {
122123
// block 1: MAX_RESULT - 1 logs, block 2: 2 logs → 9999 + 2 = 10001 > MAX_RESULT
123124
Manager manager = buildMockManager(
124125
1L, buildTxList(MAX_RESULT - 1),
125126
2L, buildTxList(2));
126127
LogMatch logMatch = buildLogMatch(Arrays.asList(1L, 2L), manager);
127128

128-
try {
129-
logMatch.matchBlockOneByOne();
130-
Assert.fail("Expected JsonRpcTooManyResultException");
131-
} catch (JsonRpcTooManyResultException e) {
132-
Assert.assertTrue(e.getMessage().contains(String.valueOf(MAX_RESULT)));
133-
}
129+
assertThrows(JsonRpcTooManyResultException.class, logMatch::matchBlockOneByOne);
134130
}
135131

136132
/** A block with no matching logs is skipped without incrementing the result count. */

0 commit comments

Comments
 (0)