drop subscribePeer, it's called from pubsub now (#1677)

This commit is contained in:
Dmitriy Ryajov 2020-09-17 03:40:21 -06:00 committed by GitHub
parent 6bde3b85a7
commit 2f89e2ab4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -848,7 +848,6 @@ proc onConnEvent(node: Eth2Node, peerId: PeerID, event: ConnEvent) {.async.} =
# * Protocol handshakes are wonky: we'll not necessarily use the newly
# connected transport - instead we'll just pick a random one!
node.pubsub.subscribePeer(peerId)
await performProtocolHandshakes(peer, event.incoming)
# While performing the handshake, the peer might have been disconnected -
@ -871,7 +870,6 @@ proc onConnEvent(node: Eth2Node, peerId: PeerID, event: ConnEvent) {.async.} =
dec peer.connections
debug "Peer disconnected", peer = $peerId, connections = peer.connections
if peer.connections == 0:
node.pubsub.unsubscribePeer(peerId)
let fut = peer.disconnectedFut
if fut != nil:
peer.disconnectedFut = nil