Fix deadlock in tests that are using with_gossip (#2533)

* fixed gossip related tests deadlock

* cleaning sync tests log

* fixed typo in logs

* send GRANDPA messages without holding validator lock

* Revert "fixed gossip related tests deadlock"

This reverts commit d3fe55e45e32b7ea2e9f05f1c511972c708209ad.
This commit is contained in:
Svyatoslav Nikolsky
2019-05-10 15:14:42 +03:00
committed by Gavin Wood
parent dfbaedd535
commit 42fa5f6209
3 changed files with 23 additions and 33 deletions
+1 -1
View File
@@ -685,7 +685,7 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
{
for (who, peer) in self.context_data.peers.iter() {
if peer.block_request.as_ref().map_or(false, |(t, _)| (tick - *t).as_secs() > REQUEST_TIMEOUT_SEC) {
trace!(target: "sync", "Reqeust timeout {}", who);
trace!(target: "sync", "Request timeout {}", who);
aborting.push(who.clone());
} else if peer.obsolete_requests.values().any(|t| (tick - *t).as_secs() > REQUEST_TIMEOUT_SEC) {
trace!(target: "sync", "Obsolete timeout {}", who);