Cosmos-sdk: Rename hooks to clarify when they will be called

Created on 19 Oct 2018  路  3Comments  路  Source: cosmos/cosmos-sdk

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

distribution slashing staking

Most helpful comment

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.

All 3 comments

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

fedekunze picture fedekunze  路  3Comments

jackzampolin picture jackzampolin  路  3Comments

adrianbrink picture adrianbrink  路  3Comments