Skip to content

Commit

Permalink
timeouts and don't call subscribePeer just yet
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov committed Aug 2, 2020
1 parent 0308c28 commit 2936f73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions beacon_chain/eth2_network.nim
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ const
## Period of time for dead peers.
SeenTableTimeIrrelevantNetwork* = 24.hours
## Period of time for `IrrelevantNetwork` error reason.
SeenTableTimeClientShutDown* = 10.minutes
SeenTableTimeClientShutDown* = 1.minutes
## Period of time for `ClientShutDown` error reason.
SeemTableTimeFaultOrError* = 10.minutes
SeemTableTimeFaultOrError* = 1.minutes
## Period of time for `FaultOnError` error reason.

var successfullyDialledAPeer = false # used to show a warning
Expand Down Expand Up @@ -757,8 +757,8 @@ proc dialPeer*(node: Eth2Node, peerInfo: PeerInfo) {.async.} =
var peer = node.getPeer(peerInfo)
peer.wasDialed = true

if not(isNil(peer)) and isNil(peer.pubsubFut):
peer.pubsubFut = node.switch.subscribePeer(peerInfo)
# if not(isNil(peer)) and isNil(peer.pubsubFut):
# peer.pubsubFut = node.switch.subscribePeer(peerInfo)

#let msDial = newMultistream()
#let conn = node.switch.connections.getOrDefault(peerInfo.id)
Expand Down

0 comments on commit 2936f73

Please sign in to comment.