/// Generates a random hash out of a seed.
Generates a random hash out of a seed.
Generates a random hash out of a seed .
fn generate_random_hash(phrase: &[u8], sender: T::AccountId) -> T::Hash {
        let (seed, _) = T::Randomness::random(phrase);
        let seed = <[u8; 32]>::decode(&mut TrailingZeroInput::new(seed.as_ref()))
            .expect("input is padded with zeroes; qed");
        return (seed, &sender, Self::encode_and_update_nonce()).using_encoded(T::Hashing::hash);
    }
fn generate_random_hash ( phrase : & [ u8 ] , sender : T :: AccountId ) -> T :: Hash { let ( seed , _ ) = T :: Randomness :: random ( phrase ) ; let seed = < [ u8 ; 32 ] > :: decode ( & mut TrailingZeroInput :: new ( seed . as_ref ( ) ) ) . expect ( " " ) ; return ( seed , & sender , Self :: encode_and_update_nonce ( ) ) . using_encoded ( T :: Hashing :: hash ) ; }
Generates a random hash out of a seed.
Generates a random hash out of a seed .
phrase
&[u8]
sender
T::AccountId