pub fn random(rng: &mut TestRng) -> Self {
        let validator_public_key =
            PublicKey::from(&SecretKey::ed25519_from_bytes(rng.gen::<[u8; 32]>()).unwrap());
        let delegator_public_key =
            PublicKey::from(&SecretKey::ed25519_from_bytes(rng.gen::<[u8; 32]>()).unwrap());
        let balance = Motes::new(U512::from(rng.gen::<u64>()));
        let delegated_amount = Motes::new(U512::from(rng.gen::<u64>()));

        DelegatorConfig {
            validator_public_key,
            delegator_public_key,
            balance,
            delegated_amount,
        }
    }
/// 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 validator_public_key =
            PublicKey::from(&SecretKey::ed25519_from_bytes(rng.gen::<[u8; 32]>()).unwrap());
        let delegator_public_key =
            PublicKey::from(&SecretKey::ed25519_from_bytes(rng.gen::<[u8; 32]>()).unwrap());
        let balance = Motes::new(U512::from(rng.gen::<u64>()));
        let delegated_amount = Motes::new(U512::from(rng.gen::<u64>()));
        DelegatorConfig {
            validator_public_key,
            delegator_public_key,
            balance,
            delegated_amount,
        }
    }
pub fn random ( rng : & mut TestRng ) -> Self { let validator_public_key = PublicKey :: from ( & SecretKey :: ed25519_from_bytes ( rng . gen :: < [ u8 ; 32 ] > ( ) ) . unwrap ( ) ) ; let delegator_public_key = PublicKey :: from ( & SecretKey :: ed25519_from_bytes ( rng . gen :: < [ u8 ; 32 ] > ( ) ) . unwrap ( ) ) ; let balance = Motes :: new ( U512 :: from ( rng . gen :: < u64 > ( ) ) ) ; let delegated_amount = Motes :: new ( U512 :: from ( rng . gen :: < u64 > ( ) ) ) ; DelegatorConfig { validator_public_key , delegator_public_key , balance , delegated_amount , } }
Generates a random instance using a `TestRng`.
Generates a random instance using a ` TestRng ` .
rng
&mut TestRng
rng
&mut TestRng