mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
Self-Vote for Staking (among others.) (#2078)
* initial doc for the staking module * Remove md style links. * Remove todos. * Add rust code types * Rename and fix review notes. * Add new md file * Final touches. * Migrate compleatly to rustdoc * Update link * Fix heading * Final touches wrt the new template. * Remove empty prereq. * Fix more reviews * Some final nits. * Fix some side issues. * Fix another set of reviews * Fix + stabilize leftover reivews. * Remove unused test parameters * Fix typo. * Merge redundant loops * Adds phantom self-vote * Fix broken tests. * Refactor some names to match the reference. * Remove redundant inner loops from election round. * Introduce phragmen post-processing. * Some fixes and todos. * Fix some tests with new phragmen params * Fix test * Bump spec * Fix wasm build * Fix tests and phragmen fallback. Avoid double-controlling * Fix and rebuild wasm * Whitespaces, whitespaces everywhere. * Rebuild * Disable post-processing. * Identify by stash, not controller account. * Couple of fixes * Fix first test * Fix invulnerability_should_work * Fix a couple more tests * Fix more tests * Fix more tests * Fix more tests * Fix some tests * Fix update-ledger. * Fix update-ledger. * Fix another test * Fix another test * Fix rest of staking tests * Remove printlns * Rebuild wasm * Fix & tests for auth/val syncing * Fix up threading for tests * Remove superfluous asserts
This commit is contained in:
@@ -244,6 +244,12 @@ impl<T: Trait> Module<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Set a single authority by index.
|
||||
pub fn set_authority_count(count: u32) {
|
||||
Self::save_original_authorities(None);
|
||||
AuthorityStorageVec::<T::SessionKey>::set_count(count);
|
||||
}
|
||||
|
||||
/// Set a single authority by index.
|
||||
pub fn set_authority(index: u32, key: &T::SessionKey) {
|
||||
let current_authority = AuthorityStorageVec::<T::SessionKey>::item(index);
|
||||
|
||||
Reference in New Issue
Block a user