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

epoch converted to number in 'near validators <epoch>' #715

Merged
merged 3 commits into from
Apr 21, 2021

Conversation

volovyks
Copy link
Collaborator

closing #666

@volovyks volovyks added the bug Something isn't working label Apr 17, 2021
@volovyks volovyks self-assigned this Apr 17, 2021
@volovyks volovyks requested a review from vgrichina April 17, 2021 15:32
@volovyks volovyks linked an issue Apr 17, 2021 that may be closed by this pull request
Copy link
Contributor

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

I am not sure what this is supposed to do. Epoch id is not an integer and cannot be parsed as such

@volovyks
Copy link
Collaborator Author

@bowenwang1996 looks like the function parameter should be called blockNumber (Docs: https://docs.near.org/docs/api/rpc#detailed-validator-status). And it should be a number, not a string. Thanks for pointing this out!
P.S. Check the attached issue for more context.

@vgrichina
Copy link
Contributor

vgrichina commented Apr 19, 2021

@bowenwang1996 looks like the function parameter should be called blockNumber (Docs: https://docs.near.org/docs/api/rpc#detailed-validator-status). And it should be a number, not a string. Thanks for pointing this out!

@volovyk-s looks like there is opportunity to pass block hash as well – we should support passing either IMO.

Note that in case you want to have yargs always parse some option into number there is such possibility:
https://github.com/yargs/yargs/blob/master/docs/api.md#numberkey

(won't work for the case when you need to support both block hash and number though)

@volovyks
Copy link
Collaborator Author

@bowenwang1996 looks like the function parameter should be called blockNumber (Docs: https://docs.near.org/docs/api/rpc#detailed-validator-status). And it should be a number, not a string. Thanks for pointing this out!

@volovyk-s looks like there is opportunity to pass block hash as well – we should support passing either IMO.

Note that in case you want to have yargs always parse some option into number there is such possibility:
https://github.com/yargs/yargs/blob/master/docs/api.md#numberkey

(won't work for the case when you need to support both block hash and number though)

Updated.
To avoid breaking changes I have not added new options (--blockHash and --blockNumber).

@vgrichina vgrichina merged commit d8f5a99 into master Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

near validators <int> doesn't work
3 participants