Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@joepetrowski
Copy link
Contributor

Closes #5223

The reason to emit events is to find out the actual change to the staking ledger as users could call bond, bond_extra, unbond, or withdraw_unbonded with a different value than will actually update the staking ledger.

@joepetrowski joepetrowski added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes labels Mar 11, 2020
@parity-cla-bot

This comment has been minimized.

@kianenigma
Copy link
Contributor

I am slightly against because at least the example of unbond can easily be determined by the origin/service provider. Generally, (and preferably) the chain should be seen as lazy unit that does something (i.e. store and emit an event) only when it absolutely has to. I think this stuff can be computed offchain.

Nonetheless, if it is worth the cost of an event, I am also okay with this.

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits. Update the labels after fixing.

@kianenigma kianenigma added A8-looksgood and removed A0-please_review Pull request needs code review. labels Mar 12, 2020
@gavofyork gavofyork merged commit f5c6ebf into master Mar 12, 2020
@gavofyork gavofyork deleted the joe-add-staking-events branch March 12, 2020 23:38
General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Mar 17, 2020
…h#5228)

* add events to bonding and unbonding ops

* add semicolon on event line

* fix nits
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

B0-silent Changes should not be mentioned in any release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emit events for liquidity changes in Staking

6 participants