Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants