pub fn random(rng: &mut TestRng) -> Self {
        let name = rng.gen::<char>().to_string();
        let accounts = vec![rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()];
        let delegators = vec![rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()];
        let accounts_config = AccountsConfig::new(accounts, delegators);
        let maximum_net_message_size = 4 + rng.gen_range(0..4);

        NetworkConfig {
            name,
            maximum_net_message_size,
            accounts_config,
        }
    }
/// Generates a random instance using a `TestRng`.
Generates a random instance using a `TestRng`.
Generates a random instance using a ` TestRng ` .
pub fn random(rng: &mut TestRng) -> Self {
        let name = rng.gen::<char>().to_string();
        let accounts = vec![rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()];
        let delegators = vec![rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()];
        let accounts_config = AccountsConfig::new(accounts, delegators);
        let maximum_net_message_size = 4 + rng.gen_range(0..4);
        NetworkConfig {
            name,
            maximum_net_message_size,
            accounts_config,
        }
    }
pub fn random ( rng : & mut TestRng ) -> Self { let name = rng . gen :: < char > ( ) . to_string ( ) ; let accounts = vec ! [ rng gen ( ) rng gen ( ) rng gen ( ) rng gen ( ) rng gen ( ) ] ; let delegators = vec ! [ rng gen ( ) rng gen ( ) rng gen ( ) rng gen ( ) rng gen ( ) ] ; let accounts_config = AccountsConfig :: new ( accounts , delegators ) ; let maximum_net_message_size = 4 + rng . gen_range ( 0 .. 4 ) ; NetworkConfig { name , maximum_net_message_size , accounts_config , } }
Generates a random instance using a `TestRng`.
Generates a random instance using a ` TestRng ` .
rng
&mut TestRng
rng
&mut TestRng