mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
Minor fixups.
This commit is contained in:
@@ -335,6 +335,13 @@ impl From<VerifyFailed> for ClientFailed {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "net2")]
|
||||
impl<T: std::fmt::Display> From<crate::net2::transport::TransportError<T>> for Error {
|
||||
fn from(err: crate::net2::transport::TransportError<T>) -> Self {
|
||||
Self::TransportError(err.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(err: std::io::Error) -> Self {
|
||||
Self::Io(err.kind())
|
||||
|
||||
@@ -62,7 +62,7 @@ impl<T: Transport> ProtocolPing<T> {
|
||||
debug!(target: "net", "ProtocolPing::run_ping_pong() [START]");
|
||||
loop {
|
||||
// Wait channel_heartbeat amount of time.
|
||||
sleep(self.settings.channel_heartbeat_seconds).await;
|
||||
sleep(self.settings.channel_heartbeat_seconds.into()).await;
|
||||
|
||||
// Create a random nonce.
|
||||
let nonce = Self::random_nonce();
|
||||
|
||||
@@ -98,7 +98,7 @@ impl<T: Transport> ManualSession<T> {
|
||||
Err(err) => {
|
||||
info!(target: "net", "Unable to connect to manual outbound [{}]: {}", addr, err);
|
||||
|
||||
sleep(settings.connect_timeout_seconds).await;
|
||||
sleep(settings.connect_timeout_seconds.into()).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ mod tests {
|
||||
|
||||
let coin = Coin(pallas::Base::random(&mut OsRng));
|
||||
let nullifier = Nullifier::new(*s, serial);
|
||||
let leaf_position = 0;
|
||||
let leaf_position: incrementalmerkletree::Position = 0.into();
|
||||
|
||||
OwnCoin { coin, note, secret: *s, nullifier, leaf_position }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user