Skip to content
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

Decode long instead of parseLong #5135

Merged
merged 2 commits into from
Feb 24, 2023
Merged

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Feb 24, 2023

PR description

In one case reading config files use decode instead of parseLong. decode accepts 0x and decimal, only a single radix for parseLong.

Fixed Issue(s)

fixes #5134

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Acceptance Tests (Non Mainnet)

  • I have considered running ./gradlew acceptanceTestNonMainnet locally if my PR affects non-mainnet modules.

Changelog

In one case reading config files use decode instead of parseLong.
decode accepts `0x` and decimal, only a single radix for parseLong.

Signed-off-by: Danno Ferrin <[email protected]>
@@ -163,7 +163,7 @@
.computeBaseFee(
number,
Wei.fromHexString(parentBaseFee),
Long.parseLong(parentGasUsed),
Long.decode(parentGasUsed),

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
Signed-off-by: Danno Ferrin <[email protected]>
@shemnon shemnon merged commit ea6ac5e into hyperledger:main Feb 24, 2023
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
In one case reading config files used parseLong instead of decode.
decode accepts `0x` and decimal, only a single radix for parseLong.

Signed-off-by: Danno Ferrin <[email protected]>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
In one case reading config files used parseLong instead of decode.
decode accepts `0x` and decimal, only a single radix for parseLong.

Signed-off-by: Danno Ferrin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

evm t8n env file format
2 participants