-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(jsonrpc): enforce log filter cap and improve match efficiency #6732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
073771e
2c9b59d
440582b
0016f13
0b80861
6620708
5f03ddb
1b1a081
bf1f100
6dd2d44
9259d2b
46c9629
732d66a
938533a
5d15ea2
9493ecf
e99045d
ad0d688
a48b3b2
0f48bda
2666f98
2f2e11a
44266d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,8 @@ public class JsonRpcApiUtil { | |
| public static final String TAG_SAFE_SUPPORT_ERROR = "TAG safe not supported"; | ||
| public static final String BLOCK_NUM_ERROR = "invalid block number"; | ||
|
|
||
| static SecureRandom random = new SecureRandom(); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [NIT] Hoisting random to a static field is a nice perf win👍. One small follow-up: consider tightening it to private static final: |
||
|
|
||
| public static byte[] convertToTronAddress(byte[] address) { | ||
| byte[] newAddress = new byte[21]; | ||
| byte[] temp = new byte[] {Wallet.getAddressPreFixByte()}; | ||
|
|
@@ -567,7 +569,6 @@ public static long parseBlockNumber(String blockNumOrTag, Wallet wallet) | |
| } | ||
|
|
||
| public static String generateFilterId() { | ||
| SecureRandom random = new SecureRandom(); | ||
| byte[] uid = new byte[16]; // 128 bits are converted to 16 bytes | ||
| random.nextBytes(uid); | ||
| return ByteArray.toHexString(uid); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.