fn responses(
        response_fixture: &ResponseFixture,
        rng: &mut ChaChaRng,
    ) -> Vec<Option<CLibResponseBytes>> {
        (0..)
            .zip(&response_fixture.receiver_key_sets)
            .zip(&response_fixture.eligible_receivers)
            .map(|((receiver_index, key_set), eligible_receiver)| {
                if *eligible_receiver {
                    let response: CLibResponseBytes = {
                        let seed = Randomness::from(rng.gen::<[u8; 32]>());
                        let receiver_secret_key_bytes = &key_set.secret_key_bytes;
                        dkg::response::create_response(
                            seed,
                            receiver_secret_key_bytes,
                            response_fixture.dkg_id,
                            &response_fixture.dealings_with_keys(),
                            NodeIndex::try_from(receiver_index)
                                .expect("Receiver index out of range"),
                        )
                        .expect("Failed to create a response")
                    };
                    Some(response)
                } else {
                    None
                }
            })
            .collect()
    }
/// Protocol step: Receivers compute responses.
Protocol step: Receivers compute responses.
Protocol step : Receivers compute responses .
fn responses(
        response_fixture: &ResponseFixture,
        rng: &mut ChaChaRng,
    ) -> Vec<Option<CLibResponseBytes>> {
        (0..)
            .zip(&response_fixture.receiver_key_sets)
            .zip(&response_fixture.eligible_receivers)
            .map(|((receiver_index, key_set), eligible_receiver)| {
                if *eligible_receiver {
                    let response: CLibResponseBytes = {
                        let seed = Randomness::from(rng.gen::<[u8; 32]>());
                        let receiver_secret_key_bytes = &key_set.secret_key_bytes;
                        dkg::response::create_response(
                            seed,
                            receiver_secret_key_bytes,
                            response_fixture.dkg_id,
                            &response_fixture.dealings_with_keys(),
                            NodeIndex::try_from(receiver_index)
                                .expect("Receiver index out of range"),
                        )
                        .expect("Failed to create a response")
                    };
                    Some(response)
                } else {
                    None
                }
            })
            .collect()
    }
fn responses ( response_fixture : & ResponseFixture , rng : & mut ChaChaRng , ) -> Vec < Option < CLibResponseBytes > > { ( 0 .. ) . zip ( & response_fixture . receiver_key_sets ) . zip ( & response_fixture . eligible_receivers ) . map ( | ( ( receiver_index , key_set ) , eligible_receiver ) | { if * eligible_receiver { let response : CLibResponseBytes = { let seed = Randomness :: from ( rng . gen :: < [ u8 ; 32 ] > ( ) ) ; let receiver_secret_key_bytes = & key_set . secret_key_bytes ; dkg :: response :: create_response ( seed , receiver_secret_key_bytes , response_fixture . dkg_id , & response_fixture . dealings_with_keys ( ) , NodeIndex :: try_from ( receiver_index ) . expect ( " " ) , ) . expect ( " " ) } ; Some ( response ) } else { None } } ) . collect ( ) }
Protocol step: Receivers compute responses.
Protocol step : Receivers compute responses .
response_fixture
&ResponseFixture
rng
&mut ChaChaRng
response_fixture
&ResponseFixture
rng
&mut ChaChaRng