Refactor Java version output in web3_clientVersion #2679
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update Java Version Reporting in
web3_clientVersion
RPC CallDescription
Currently, the
web3_clientVersion()
RPC call always returns a hardcoded Java version string, such asJava1.8
, in the client version string (e.g., RskJ/6.3.1/Linux/Java1.8/ARROWHEAD-27cba5598
). We need to update this functionality to return the actual Java major version in the formatJava<MAJOR_VERSION>
(e.g.,Java8
,Java17
, etc.)Motivation and Context
Providing the real Java major version in the
web3_clientVersion
RPC call will enhance accuracy and help users and developers better understand the Java environment in use. This improvement is crucial for debugging and ensuring compatibility with various Java versions.How Has This Been Tested?
Types of changes
Checklist: