Use OsRng for secret key creation.

This commit is contained in:
c0gent 2018-12-05 10:21:04 -08:00
parent f1a23c687e
commit e5b9c8cbbc
No known key found for this signature in database
GPG Key ID: 9CC25E71A743E892
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ impl<T: Contribution> Hydrabadger<T> {
/// Returns a new Hydrabadger node.
pub fn new(addr: SocketAddr, cfg: Config) -> Self {
let uid = Uid::new();
let secret_key = SecretKey::rand(&mut rand::thread_rng());
let secret_key = SecretKey::rand(&mut rand::OsRng::new().expect("Unable to create rng"));
let (peer_internal_tx, peer_internal_rx) = mpsc::unbounded();
let (batch_tx, batch_rx) = mpsc::unbounded();