@@ -41,7 +41,9 @@ private TransactionInfo buildTxInfoWithLog(byte[] address) {
4141 return TransactionInfo .newBuilder ().addLog (LogInfo .buildLog (logInfo )).build ();
4242 }
4343
44- /** Events dispatched to a matching filter in the serial (<=10000 entries) path. */
44+ /**
45+ * Events dispatched to a matching filter in the serial (<=10000 entries) path.
46+ */
4547 @ Test
4648 public void testMatchingFilter_receivesLogElements () throws JsonRpcInvalidParamsException {
4749 FilterRequest fr = new FilterRequest ();
@@ -58,7 +60,9 @@ public void testMatchingFilter_receivesLogElements() throws JsonRpcInvalidParams
5860 Assert .assertEquals (1 , filterAndResult .getResult ().size ());
5961 }
6062
61- /** Filter with fromBlock=100 does not receive a capsule whose blockNumber is 50. */
63+ /**
64+ * Filter with fromBlock=100 does not receive a capsule whose blockNumber is 50.
65+ */
6266 @ Test
6367 public void testBlockNumberBelowRange_noResult () throws JsonRpcInvalidParamsException {
6468 FilterRequest fr = new FilterRequest ();
@@ -76,7 +80,9 @@ public void testBlockNumberBelowRange_noResult() throws JsonRpcInvalidParamsExce
7680 Assert .assertTrue (filterAndResult .getResult ().isEmpty ());
7781 }
7882
79- /** An expired filter is removed from the map during handleLogsFilter. */
83+ /**
84+ * An expired filter is removed from the map during handleLogsFilter.
85+ */
8086 @ Test
8187 public void testExpiredFilter_removedFromMap () throws Exception {
8288 FilterRequest fr = new FilterRequest ();
@@ -100,7 +106,9 @@ public void testExpiredFilter_removedFromMap() throws Exception {
100106 Assert .assertFalse ("expired filter should be removed" , map .containsKey (FILTER_ID_1 ));
101107 }
102108
103- /** A solidified capsule is routed only to the solidity map; the full-node map is untouched. */
109+ /**
110+ * A solidified capsule is routed only to the solidity map; the full-node map is untouched.
111+ */
104112 @ Test
105113 public void testSolidifiedCapsule_routedToSolidityMap () throws JsonRpcInvalidParamsException {
106114 FilterRequest fr = new FilterRequest ();
@@ -121,7 +129,9 @@ public void testSolidifiedCapsule_routedToSolidityMap() throws JsonRpcInvalidPar
121129 Assert .assertTrue ("full-node filter must not be touched" , fullFilter .getResult ().isEmpty ());
122130 }
123131
124- /** A non-solidified capsule is routed only to the full-node map. */
132+ /**
133+ * A non-solidified capsule is routed only to the full-node map.
134+ */
125135 @ Test
126136 public void testNonSolidifiedCapsule_routedToFullMap () throws JsonRpcInvalidParamsException {
127137 FilterRequest fr = new FilterRequest ();
@@ -142,7 +152,9 @@ public void testNonSolidifiedCapsule_routedToFullMap() throws JsonRpcInvalidPara
142152 Assert .assertTrue ("solidity filter must not be touched" , solidityFilter .getResult ().isEmpty ());
143153 }
144154
145- /** Both filters in the map receive events when both match. */
155+ /**
156+ * Both filters in the map receive events when both match.
157+ */
146158 @ Test
147159 public void testMultipleMatchingFilters_bothReceiveEvents () throws JsonRpcInvalidParamsException {
148160 FilterRequest fr = new FilterRequest ();
@@ -162,7 +174,9 @@ public void testMultipleMatchingFilters_bothReceiveEvents() throws JsonRpcInvali
162174 Assert .assertEquals (1 , filter2 .getResult ().size ());
163175 }
164176
165- /** An empty txInfoList produces no results. */
177+ /**
178+ * An empty txInfoList produces no results.
179+ */
166180 @ Test
167181 public void testEmptyTxInfoList_noResult () throws JsonRpcInvalidParamsException {
168182 FilterRequest fr = new FilterRequest ();
@@ -177,14 +191,8 @@ public void testEmptyTxInfoList_noResult() throws JsonRpcInvalidParamsException
177191 Assert .assertTrue (filterAndResult .getResult ().isEmpty ());
178192 }
179193
180- // -------------------------------------------------------------------------
181- // Parallel path tests (filterParallelThreshold lowered to 2 via reflection)
182- // -------------------------------------------------------------------------
183-
184- private void setParallelThreshold (int value ) throws Exception {
185- Field f = TronJsonRpcImpl .class .getDeclaredField ("filterParallelThreshold" );
186- f .setAccessible (true );
187- f .setInt (jsonRpc , value );
194+ private void setParallelThreshold (int value ) {
195+ jsonRpc .setFilterParallelThreshold (value );
188196 }
189197
190198 /**
0 commit comments