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

server: fix EthChainID webserver endpoint in offchain mode to return 'offchain' instead of '0' #1455

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

kyriediculous
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Fixes a bug whereby the EthChainID webserver handler returns "0" when offchain , but the actual check compares against the string literal "offchain"

w.Write([]byte("0"))

func (w *wizard) checkNet() {

Specific updates (required)

  • write "offchain" to the http response in offchain mode
  • add unit test for on-chain mode

How did you test each of these updates (required)
adjusted & ran unit tests
ran reproduction steps in CLI (run in offchain mode, then run CLI)

Does this pull request close any open issues?
Fixes #1378

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

server/webserver.go Outdated Show resolved Hide resolved
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

Changes look good - let's rebase

@kyriediculous
Copy link
Contributor Author

rebased !

Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@yondonfu yondonfu merged commit 2d30955 into master Apr 20, 2020
@yondonfu yondonfu deleted the nv/fix-cli-offchain branch April 20, 2020 23:32
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.

livepeer_cli runtime error
2 participants