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

[mtg-576] Ultra experimental penalties #35

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

kstepanovdev
Copy link
Collaborator

No description provided.

also providing additional field and methods related to penalties for a Voter
@kstepanovdev kstepanovdev self-assigned this Sep 13, 2024
Copy link
Contributor

@StanChe StanChe left a comment

Choose a reason for hiding this comment

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

Great job! Just couple minor fixes


pub fn allow_tokenflow(&mut self) -> Result<()> {
if !self.is_tokenflow_restricted() {
Err(MplStakingError::MiningAlreadyRestricted.into())
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably a different error (or rename this one) as this one is misleading

@@ -17,17 +13,13 @@ pub fn restrict_batch_minting(
MplStakingError::InvalidRealmAuthority
);

let signers_seeds = registrar_seeds!(&registrar);
require!(
until_ts > clock_unix_timestamp(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could drop this check as a way to remove the restriction. The use case is to restrict a user for a month and then remove the restriction once the user is cleared

Copy link
Collaborator Author

@kstepanovdev kstepanovdev Sep 16, 2024

Choose a reason for hiding this comment

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

It's rather not to set a time for the penalty that is lower than the current one, which wouldn't make sense. upd: repharse

@kstepanovdev kstepanovdev merged commit 4e0cfe4 into experimental-slashing Sep 16, 2024
0 of 2 checks passed
@kstepanovdev kstepanovdev deleted the ultra-experimental-penalties branch September 16, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants