Adds gossipsub object validation and verification

This commit is contained in:
Age Manning
2019-09-05 02:06:39 +10:00
parent 192380cb58
commit e7ab89a783
8 changed files with 106 additions and 47 deletions

View File

@@ -169,6 +169,7 @@ where
fn inject_connected(&mut self, peer_id: PeerId, _endpoint: ConnectedPoint) {
self.connected_peers.insert(peer_id);
// TODO: Drop peers if over max_peer limit
metrics::inc_counter(&metrics::PEER_CONNECT_EVENT_COUNT);
metrics::set_gauge(&metrics::PEERS_CONNECTED, self.connected_peers() as i64);