mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Disable validators but don't kick them (#2870)
* Disable validators but don't kick them * Bump runtime * Remove stray printlns
This commit is contained in:
@@ -359,10 +359,16 @@ impl<T: Trait> Module<T> {
|
||||
}
|
||||
|
||||
/// Disable the validator of index `i`.
|
||||
pub fn disable(i: usize) {
|
||||
pub fn disable_index(i: usize) {
|
||||
T::SessionHandler::on_disabled(i);
|
||||
<Changed<T>>::put(true);
|
||||
}
|
||||
|
||||
/// Disable the validator identified by `c`. (If using with the staking module, this would be
|
||||
/// their *controller* account.)
|
||||
pub fn disable(c: &T::AccountId) -> rstd::result::Result<(), ()> {
|
||||
Self::validators().iter().position(|i| i == c).map(Self::disable_index).ok_or(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait> OnFreeBalanceZero<T::AccountId> for Module<T> {
|
||||
|
||||
Reference in New Issue
Block a user