Avoid carrying rng

This commit is contained in:
Franck Royer 2021-02-03 15:25:05 +11:00
parent 25bf5df122
commit e82383bcf6
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
5 changed files with 24 additions and 39 deletions

View file

@ -23,7 +23,6 @@ use futures::{
pin_mut,
};
use libp2p::PeerId;
use rand::rngs::OsRng;
use sha2::Sha256;
use std::sync::Arc;
use tokio::time::timeout;
@ -62,7 +61,7 @@ pub async fn negotiate(
)
.await??;
let alice_message0 = state0.next_message(&mut OsRng);
let alice_message0 = state0.next_message();
event_loop_handle
.send_message0(channel, alice_message0)
.await?;