-
Notifications
You must be signed in to change notification settings - Fork 0
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
[mtg-576] Ultra experimental penalties #35
Conversation
also providing additional field and methods related to penalties for a Voter
There was a problem hiding this 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
program-states/src/state/voter.rs
Outdated
|
||
pub fn allow_tokenflow(&mut self) -> Result<()> { | ||
if !self.is_tokenflow_restricted() { | ||
Err(MplStakingError::MiningAlreadyRestricted.into()) |
There was a problem hiding this comment.
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!(®istrar); | |||
require!( | |||
until_ts > clock_unix_timestamp(), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
No description provided.