Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
client/finality-grandpa: Do not import ready into scope
Browse files Browse the repository at this point in the history
Instead of importing futures03::future::ready into the scope, only
import futures::future03 into scope and call ready as furure03::ready.
  • Loading branch information
mxinden committed Jan 22, 2020
1 parent f04f335 commit 6858319
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/finality-grandpa/src/communication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use futures::prelude::*;
use futures03::{
channel::mpsc as mpsc03,
compat::Compat,
future::{Future as Future03, ready},
future::{self as future03, Future as Future03},
sink::Sink as Sink03,
stream::{Stream as Stream03, StreamExt},
};
Expand Down Expand Up @@ -298,13 +298,13 @@ impl<B: BlockT, N: Network<B>> NetworkBridge<B, N> {
match decoded {
Err(ref e) => {
debug!(target: "afg", "Skipping malformed message {:?}: {}", notification, e);
return ready(None);
return future03::ready(None);
}
Ok(GossipMessage::Vote(msg)) => {
// check signature.
if !voters.contains_key(&msg.message.id) {
debug!(target: "afg", "Skipping message from unknown voter {}", msg.message.id);
return ready(None);
return future03::ready(None);
}

match &msg.message.message {
Expand All @@ -331,11 +331,11 @@ impl<B: BlockT, N: Network<B>> NetworkBridge<B, N> {
},
};

ready(Some(msg.message))
future03::ready(Some(msg.message))
}
_ => {
debug!(target: "afg", "Skipping unknown message type");
return ready(None);
return future03::ready(None);
}
}
});
Expand Down

0 comments on commit 6858319

Please sign in to comment.