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

Review naming #48

Closed
ducthotran2010 opened this issue Nov 4, 2022 · 2 comments · Fixed by #97
Closed

Review naming #48

ducthotran2010 opened this issue Nov 4, 2022 · 2 comments · Fixed by #97
Labels

Comments

@ducthotran2010
Copy link
Collaborator

function maintaining(address _consensusAddr, uint256 _block) public view returns (bool) {

    Note: same for `bulkMaintaining`
  1. Naming: confusing names

  2. As stated in the comment of scheduled, the checking must be done in range of blocks, not just by a timestamp indicated by a single block.

Originally posted by @nxqbao in #22 (comment)

@nxqbao
Copy link
Contributor

nxqbao commented Nov 11, 2022

I think should add is/bulkIs prefix to view methods that returns bool/bool[] for clarity.
Adding them also partially solves #69.

@ducthotran2010
Copy link
Collaborator Author

The pattern bulk + function name should work fine for the mutable functions, but for the view functions, we can workaround by renaming them, e.g:

  • jailed: getJailedStatus and getJailedStatuses
  • stakingAmountOf: getStakingAmount and getStakingAmounts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants