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(RewardsStreamerMP): change account mp update time only if necessary #100

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

0x-r4bbit
Copy link
Collaborator

Closes #52

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran pnpm adorno?
  • Ran pnpm verify?

if (accruedMP > 0 || forceMPUpdate) {
account.mpAccrued += accruedMP;
account.lastMPUpdateTime = block.timestamp;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Different options here... I went with forceMPUpdate flag, instead of explicitly updating account.lastMPUpdateTime in places where necessary.

@0x-r4bbit 0x-r4bbit merged commit aa15954 into main Dec 20, 2024
11 checks passed
@gravityblast gravityblast deleted the fix/zero-mp-update branch December 20, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Staking too low balance can cause MP to be zero.
2 participants