Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.tron.core.services.jsonrpc.filters;

import static org.tron.common.math.Maths.min;
import static org.tron.core.services.jsonrpc.TronJsonRpcImpl.INVALID_BLOCK_RANGE;

import com.google.protobuf.ByteString;
import lombok.Getter;
Expand Down Expand Up @@ -84,7 +83,7 @@ public LogFilterWrapper(FilterRequest fr, long currentMaxBlockNum, Wallet wallet
toBlockSrc = Long.MAX_VALUE;
}
if (fromBlockSrc > toBlockSrc) {
throw new JsonRpcInvalidParamsException(INVALID_BLOCK_RANGE);
throw new JsonRpcInvalidParamsException("please verify: fromBlock <= toBlock");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ public void testLogFilterWrapper() {
LogFilterWrapper logFilterWrapper =
new LogFilterWrapper(new FilterRequest("0x78", "0x14", null, null, null), 100, null);
} catch (JsonRpcInvalidParamsException e) {
Assert.assertEquals("invalid block range params", e.getMessage());
Assert.assertEquals("please verify: fromBlock <= toBlock", e.getMessage());
}

//fromBlock or toBlock is not hex num
Expand Down