From 16b250d7ea139f89f37de0d508d1e22ec818a9fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastian=20K=C3=B6cher?= <bkchr@users.noreply.github.com>
Date: Tue, 2 Feb 2021 17:05:23 +0100
Subject: [PATCH] Remove from `known_collators` on disconnect (#2364)

---
 polkadot/node/network/collator-protocol/src/validator_side.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/polkadot/node/network/collator-protocol/src/validator_side.rs b/polkadot/node/network/collator-protocol/src/validator_side.rs
index 50203e4c71a..f15a95f07be 100644
--- a/polkadot/node/network/collator-protocol/src/validator_side.rs
+++ b/polkadot/node/network/collator-protocol/src/validator_side.rs
@@ -656,6 +656,7 @@ where
 			// want to track it's view or take any other actions.
 		},
 		PeerDisconnected(peer_id) => {
+			state.known_collators.remove(&peer_id);
 			state.peer_views.remove(&peer_id);
 		},
 		PeerViewChange(peer_id, view) => {
-- 
GitLab