mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Add keypair gen fn for testing
This commit is contained in:
@@ -7,3 +7,4 @@ use super::state::crystallized_state;
|
||||
|
||||
pub mod types;
|
||||
pub mod bls;
|
||||
pub mod test_helpers;
|
||||
|
||||
13
src/utils/test_helpers.rs
Normal file
13
src/utils/test_helpers.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
extern crate rand;
|
||||
|
||||
use super::bls::Keypair;
|
||||
use self::rand::{ SeedableRng, XorShiftRng };
|
||||
|
||||
// Returns a keypair for use in testing purposes.
|
||||
pub fn get_dangerous_test_keypair() -> Keypair {
|
||||
let mut rng = XorShiftRng::from_seed([0xbc4f6d44,
|
||||
0xd62f276c,
|
||||
0xb963afd0,
|
||||
0x5455863d]);
|
||||
Keypair::generate(&mut rng)
|
||||
}
|
||||
Reference in New Issue
Block a user