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

Always pass a callback as the last function parameter #2449

Closed
jondubois opened this issue Oct 8, 2018 · 0 comments · Fixed by #2597
Closed

Always pass a callback as the last function parameter #2449

jondubois opened this issue Oct 8, 2018 · 0 comments · Fixed by #2597
Assignees
Milestone

Comments

@jondubois
Copy link
Contributor

jondubois commented Oct 8, 2018

Expected behavior

If provided, the callback parameter to a function should be the last one.
Alternatively, if suitable, a Promise can be returned.

Actual behavior

Functions including blockchainReady, nodeStatus, getHeight, newRound, blocks, newBlock have a cb parameter, but it is not the last one in the function declaration (this violates the Node.js convention).

Steps to reproduce

See the test/common/utils/wait_for.js module.

Which version(s) does this affect? (Environment, OS, etc...)

1.2.0

@jondubois jondubois changed the title Improve parameters for wait_for modulet Improve parameters for wait_for module Oct 8, 2018
@jondubois jondubois changed the title Improve parameters for wait_for module Improve parameters for wait_for util Oct 8, 2018
@jondubois jondubois changed the title Improve parameters for wait_for util Improve parameters for wait_for util functions Oct 8, 2018
@MaciejBaj MaciejBaj added *medium and removed *easy labels Nov 28, 2018
@MaciejBaj MaciejBaj changed the title Improve parameters for wait_for util functions Always pass a callback as the last function parameter Nov 29, 2018
MaciejBaj added a commit that referenced this issue Dec 6, 2018
…_for-util-functions

Always pass a callback as the last function parameter - Closes #2449
@MaciejBaj MaciejBaj added this to the Version 1.4.0 milestone Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants