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

Fix bookkeeping and querying around mining stakes #1016

Merged
merged 2 commits into from
Feb 5, 2022

Conversation

area
Copy link
Member

@area area commented Feb 4, 2022

Two sort-of-related updates:

  • When a miner is punished, the stake was removed from their Obligation in TokenLocking, but not from the mapping miningStakes on colonyNetwork. This PR now removes it from both.
  • When querying a miner's stake in the contracts and the client, we mostly used getObligation on tokenLocking (which is why the above error wasn't caught by our tests), looking at the obligation they had to the colonyNetwork contract in CLNY tokens. While these numbers have to be the same currently, there's no guarantee of that being the case in the future. This change future-proofs us should a new feature change this.

This PR is based against master, and I would intend to do a release and deployment once merged.

@kronosapiens kronosapiens merged commit 7c8bbae into master Feb 5, 2022
@kronosapiens kronosapiens deleted the fix/mining-stake-not-obligation branch February 5, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants