* remove kv seperation for marshalling * pending * cleanup * cleanup x2 * pending * working * minor refactors * entry structs defined * uncompiled mechanism written * add many compile fixes * code compiles * fix test compile errors * test cover passes * ... * multiple entries fix * ... * more design fix * working * fix test cover bug * Update PENDING.md * update comment around queue completion for redelegations/ubds * basic spec updates * spec folder cleanup * cleanup docs folder cont. * ... * find-replace and folder rename * supplimentary find/replace * pending * supplimentary * pending * few undos, stakingd -> staked * to staking -> to stake * undos * most staking -> most stake * ... * undos * simplestake->simplestaking * ... * pending update * capital letter replacements * ... * working * staking doc updates from rigel/delegation-index branch * spec-spec * spec-spec * LooseTokens -> NotBondedTokens * staking state.md updates * updates to hook and endblock spec * Update docs/gaia/gaiacli.md Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * Update docs/gaia/validators/validator-setup.md Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * Update docs/gaia/validators/validator-setup.md Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * comment undo * remove ErrConflictingRedelegation * @cwgoes comments are resolved * further updates to endblock and state * msg json update * working transaction updates * working * complete transaction rewrite * PENDING.md * typo * add todo * address @jackzampolin @cwgoes comments * couple leftover comments, rename * Update x/staking/types/pool.go Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * cwgoes additions * cwgoes suggestions x2
1.2 KiB
1.2 KiB
Hooks
Other modules may register operations to execute when a certain event has
occurred within staking. These events can be registered to execute either
right Before or After the staking event (as per the hook name). The
following hooks can registered with staking:
AfterValidatorCreated(Context, ValAddress)- called when a validator is created
BeforeValidatorModified(Context, ValAddress)- called when a validator's state is changed
AfterValidatorRemoved(Context, ConsAddress, ValAddress)- called when a validator is deleted
AfterValidatorBonded(Context, ConsAddress, ValAddress)- called when a validator is bonded
AfterValidatorBeginUnbonding(Context, ConsAddress, ValAddress)- called when a validator begins unbonding
AfterValidatorPowerDidChange(Context, ConsAddress, ValAddress)- called at EndBlock when a validator's power is changed
BeforeDelegationCreated(Context, AccAddress, ValAddress)- called when a delegation is created
BeforeDelegationSharesModified(Context, AccAddress, ValAddress)- called when a delegation's shares are modified
BeforeDelegationRemoved(Context, AccAddress, ValAddress)- called when a delegation is removed