Recursive election provider as fallback (#9648)

* Recursive election provider as fallback

* minor fix

* Fix integrity tests

* Update frame/election-provider-multi-phase/src/lib.rs

Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>

* Fix everything

* fmt again

* Fix test

* Fix state machine warning

* Fix build

Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
This commit is contained in:
Kian Paimani
2021-09-12 15:38:32 +01:00
committed by GitHub
parent c09d52ead7
commit 056fd9b8a8
12 changed files with 190 additions and 157 deletions
@@ -1579,7 +1579,8 @@ mod tests {
let mut seed = [0; 16];
for i in 0..50u32 {
let mut child_infos = Vec::new();
seed[0..4].copy_from_slice(&i.to_be_bytes()[..]);
let seed_partial = &mut seed[0..4];
seed_partial.copy_from_slice(&i.to_be_bytes()[..]);
let mut rand = SmallRng::from_seed(seed);
let nb_child_trie = rand.next_u32() as usize % 25;