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

[issue-1300] Update net_version JSON-RPC call to return network ID instead of chain ID #1355

Merged
merged 4 commits into from
Sep 1, 2020

Conversation

edwardmack
Copy link
Contributor

@edwardmack edwardmack commented Sep 1, 2020

PR description

This PR implements fix to JSON-RPC method net_version to return network ID as specified in https://eth.wiki/json-rpc/API#net_version.

Signed-off-by: Edward Mack ed@edwardmack.com

Fixed Issue(s)

fixes #1300

Changelog

Signed-off-by: Edward Mack <ed@edwardmack.com>
Signed-off-by: Edward Mack <ed@edwardmack.com>
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests?

  • org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.NetVersionTest will need at least editorial changes
  • There should be an integration test somehow where chainId and networkId differ. I think adding two tests in ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth, one for the eth_chainId method and one for net_version should prove it because I think networkId is 123 and chainId is 1 in those tests.

Signed-off-by: Edward Mack <ed@edwardmack.com>
Signed-off-by: Edward Mack <ed@edwardmack.com>
@edwardmack
Copy link
Contributor Author

@shemnon I've added testing, I believe we have good coverage now. Let me know your thoughts.

@edwardmack edwardmack requested a review from shemnon September 1, 2020 20:57
@edwardmack edwardmack merged commit 8241a47 into hyperledger:master Sep 1, 2020
@edwardmack edwardmack deleted the ed/net_version_fix branch September 1, 2020 22:12
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.

JSON-RPC method net_version should return network ID instead of chain ID
2 participants