diff --git a/substrate/core/finality-grandpa/src/communication/gossip.rs b/substrate/core/finality-grandpa/src/communication/gossip.rs index 93511b759d..62bfe8a657 100644 --- a/substrate/core/finality-grandpa/src/communication/gossip.rs +++ b/substrate/core/finality-grandpa/src/communication/gossip.rs @@ -623,13 +623,12 @@ impl GossipValidator { { let mut broadcast_topics = Vec::new(); let action = { - let mut inner = self.inner.write(); match GossipMessage::::decode(&mut data) { Some(GossipMessage::VoteOrPrecommit(ref message)) - => inner.validate_round_message(who, message), - Some(GossipMessage::Commit(ref message)) => inner.validate_commit_message(who, message), + => self.inner.write().validate_round_message(who, message), + Some(GossipMessage::Commit(ref message)) => self.inner.write().validate_commit_message(who, message), Some(GossipMessage::Neighbor(update)) => { - let (topics, action) = inner.import_neighbor_message( + let (topics, action) = self.inner.write().import_neighbor_message( who, update.into_neighbor_packet(), );