Skip to content

Commit 00ab69c

Browse files
committed
fix the memory allocation of eth_newBlockFilter
1 parent d93b646 commit 00ab69c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ public static void handleBLockFilter(BlockFilterCapsule blockFilterCapsule) {
193193
it = getBlockFilter2ResultFull().entrySet().iterator();
194194
}
195195

196+
String blockHash = ByteArray.toJsonHex(blockFilterCapsule.getBlockHash());
196197
while (it.hasNext()) {
197198
Entry<String, BlockFilterAndResult> entry = it.next();
198199
if (entry.getValue().isExpire()) {
199200
it.remove();
200201
continue;
201202
}
202-
String blockHash = ByteArray.toJsonHex(blockFilterCapsule.getBlockHash());
203203
String finalBlockHash = blockHash;
204204
try {
205205
// compare with hashcode() first, then with equals(). If not exist, put it.

0 commit comments

Comments
 (0)