Vote locks for all reasons except RESERVE (#13914)

* Vote locks tip

* except reserve

* reason for delegate

* fix tests

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Muharem Ismailov
2023-04-24 16:57:45 +02:00
committed by GitHub
parent 3688575fd0
commit 97f4a09591
3 changed files with 26 additions and 6 deletions
+7 -2
View File
@@ -639,7 +639,12 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
},
}
});
T::Currency::extend_lock(CONVICTION_VOTING_ID, who, amount, WithdrawReasons::TRANSFER);
T::Currency::extend_lock(
CONVICTION_VOTING_ID,
who,
amount,
WithdrawReasons::except(WithdrawReasons::RESERVE),
);
}
/// Rejig the lock on an account. It will never get more stringent (since that would indicate
@@ -669,7 +674,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
CONVICTION_VOTING_ID,
who,
lock_needed,
WithdrawReasons::TRANSFER,
WithdrawReasons::except(WithdrawReasons::RESERVE),
);
}
}