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

Rename hooks to clarify when they will be called #2538

Closed
cwgoes opened this issue Oct 19, 2018 · 3 comments
Closed

Rename hooks to clarify when they will be called #2538

cwgoes opened this issue Oct 19, 2018 · 3 comments
Assignees
Labels

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Oct 19, 2018

OnXYZ() hooks should be called after the relevant operations have completed & results have been written to the store

BeforeXYZ() hooks should be called before the relevant operations have made any updates to the store

cc @rigelrozanski

@rigelrozanski
Copy link
Contributor

rigelrozanski commented Nov 6, 2018

Nice - yeah we absolutely need this, not sure on the best naming convention.
On is confusing to me, we should probably just stick to something really obvious like: Before/After or Pre/Post

@cwgoes cwgoes mentioned this issue Nov 26, 2018
5 tasks
@jackzampolin
Copy link
Member

Really pro Pre/Post I've seen that before in similar situations. Does this work still need to be completed? What are the affected files? I'm happy to take this on.

@rigelrozanski
Copy link
Contributor

All the hooks are in x/staking there is a hook interface within types/ I believe, also in cmd/gaia/app there is some hook stuff... please take it on! I can review you're work to make sure you've caught everything

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

No branches or pull requests

3 participants