lighthouse-pulse/lighthouse/utils/test_helpers.rs

13 lines
345 B
Rust
Raw Normal View History

2018-07-11 08:17:04 +00:00
extern crate rand;
use super::bls::Keypair;
use self::rand::thread_rng;
2018-07-11 08:17:04 +00:00
// Returns a keypair for use in testing purposes.
2018-07-16 06:34:34 +00:00
// It is dangerous because we provide no guarantees
// that the private key is unique or in-fact private.
2018-07-11 08:17:04 +00:00
pub fn get_dangerous_test_keypair() -> Keypair {
let mut rng = thread_rng();
2018-07-11 08:17:04 +00:00
Keypair::generate(&mut rng)
}