Merge pull request #3248 from zsfelfoldi/light-topic3

Topic discovery bugfix
pull/3256/head
Felix Lange 8 years ago committed by GitHub
commit 932d973e36
  1. 7
      les/handler.go
  2. 3
      p2p/discv5/net.go

@ -236,7 +236,7 @@ func (pm *ProtocolManager) removePeer(id string) {
}
func (pm *ProtocolManager) findServers() {
if pm.p2pServer == nil {
if pm.p2pServer == nil || pm.topicDisc == nil {
return
}
enodes := make(chan string, 100)
@ -259,7 +259,10 @@ func (pm *ProtocolManager) findServers() {
}
}
}()
time.Sleep(time.Second * 20)
select {
case <-time.After(time.Second * 20):
case <-pm.quitSync:
}
close(stop)
}

@ -863,6 +863,9 @@ func init() {
name: "verifywait",
handle: func(net *Network, n *Node, ev nodeEvent, pkt *ingressPacket) (*nodeState, error) {
switch ev {
case pingPacket:
net.handlePing(n, pkt)
return verifywait, nil
case pongPacket:
err := net.handleKnownPong(n, pkt)
return known, err

Loading…
Cancel
Save