-
Notifications
You must be signed in to change notification settings - Fork 164
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
cmd,eth,server: add voting to CLI #1461
Conversation
77ffe2b
to
cf6c09c
Compare
@kyriediculous @yondonfu do we want to include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 2 minor comments.
Other than that, changes look good so feel free to address the comments when rebasing.
for { | ||
fmt.Printf("Enter the ID of the choice you want to vote for -") | ||
choice = types.VoteChoice(w.readInt()) | ||
if ok := choice.IsValid(); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be shortened to if choice.IsValid() { ... }
|
||
result := httpPostWithParams(fmt.Sprintf("http://%v:%v/vote", w.host, w.httpPort), data) | ||
|
||
fmt.Printf("\n %v \n", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need the leading and trailing space as it will show up as:
vote success
rather than
vote success
4ecc00b
to
36d44c2
Compare
Addressed the last comments and rebased |
Looks like CI is failing:
|
36d44c2
to
fbfc53b
Compare
Apparently something went wrong in the rebase. Should be fixed. I also added a test case for a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green CI
What does this pull request do? Explain your changes. (required)
This PR adds the option to vote from the CLI (for orchestrators) so that they don't have to export their keys.
Specific updates (required)
voteHandler
for the new CLI server/vote
endpointVote()
method toLivepeerEthClient
How did you test each of these updates (required)
Added & ran unit tests
Ran workflow in CLI (except for testing with a live poll on rinkeby)
Does this pull request close any open issues?
Fixes #1447
Checklist:
./test.sh
passExample