File tree Expand file tree Collapse file tree
common/src/main/resources
test/java/org/tron/core/jsonrpc Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11package org .tron .core .jsonrpc ;
22
3+ import static org .junit .Assert .assertThrows ;
34import static org .mockito .ArgumentMatchers .anyLong ;
45import static org .mockito .Mockito .mock ;
56import 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. */
You can’t perform that action at this time.
0 commit comments