diff --git a/crates/rbuilder/src/utils/bls.rs b/crates/rbuilder/src/utils/bls.rs index 76eebb45..3194eb73 100644 --- a/crates/rbuilder/src/utils/bls.rs +++ b/crates/rbuilder/src/utils/bls.rs @@ -10,4 +10,16 @@ pub fn generate_random_bls_address() -> [u8; 48] { let sk = SecretKey::key_gen(&ikm, &[]).unwrap(); let pk = sk.sk_to_pk(); return pk.compress(); +} + + +#[cfg(test)] +mod tests { + use crate::utils::bls::generate_random_bls_address; + + #[test] + fn test_generate_random_bls_address() { + let bls_address = generate_random_bls_address(); + assert_eq!(bls_address.len(), 48, "BLS address should be of 48 length"); + } } \ No newline at end of file