fn collect(nodes: &Nodes, era_count: u64) -> SwitchBlocks {
        let mut headers = Vec::new();
        for era_number in 0..era_count {
            let mut header_iter = nodes.values().map(|runner| {
                let storage = runner.participating().storage();
                let maybe_block = storage.transactional_get_switch_block_by_era_id(era_number);
                maybe_block.expect("missing switch block").take_header()
            });
            let header = header_iter.next().unwrap();
            assert_eq!(era_number, header.era_id().value());
            for other_header in header_iter {
                assert_eq!(header, other_header);
            }
            headers.push(header);
        }
        SwitchBlocks { headers }
    }
/// Collects all switch blocks of the first `era_count` eras, and asserts that they are equal
/// in all nodes.
Collects all switch blocks of the first `era_count` eras, and asserts that they are equal
in all nodes.
Collects all switch blocks of the first ` era_count ` eras and asserts that they are equal in all nodes .
fn collect(nodes: &Nodes, era_count: u64) -> SwitchBlocks {
        let mut headers = Vec::new();
        for era_number in 0..era_count {
            let mut header_iter = nodes.values().map(|runner| {
                let storage = runner.participating().storage();
                let maybe_block = storage.transactional_get_switch_block_by_era_id(era_number);
                maybe_block.expect("missing switch block").take_header()
            });
            let header = header_iter.next().unwrap();
            assert_eq!(era_number, header.era_id().value());
            for other_header in header_iter {
                assert_eq!(header, other_header);
            }
            headers.push(header);
        }
        SwitchBlocks { headers }
    }
fn collect ( nodes : & Nodes , era_count : u64 ) -> SwitchBlocks { let mut headers = Vec :: new ( ) ; for era_number in 0 .. era_count { let mut header_iter = nodes . values ( ) . map ( | runner | { let storage = runner . participating ( ) . storage ( ) ; let maybe_block = storage . transactional_get_switch_block_by_era_id ( era_number ) ; maybe_block . expect ( " " ) . take_header ( ) } ) ; let header = header_iter . next ( ) . unwrap ( ) ; assert_eq ! ( era_number header era_id ( ) value ( ) ) ; for other_header in header_iter { assert_eq ! ( header other_header ) ; } headers . push ( header ) ; } SwitchBlocks { headers } }
Collects all switch blocks of the first `era_count` eras, and asserts that they are equal
in all nodes.
Collects all switch blocks of the first ` era_count ` eras and asserts that they are equal in all nodes .
nodes
&Nodes
era_count
u64
nodes
&Nodes
era_count
u64