From 66be6d9c961bc3ba9cae0726951511855fa33d24 Mon Sep 17 00:00:00 2001 From: benbaley Date: Mon, 22 Apr 2024 17:55:42 +0800 Subject: [PATCH] fix merge err --- p2p/dial.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/p2p/dial.go b/p2p/dial.go index 32a498c2f3..bccbbf4b10 100644 --- a/p2p/dial.go +++ b/p2p/dial.go @@ -108,7 +108,6 @@ type dialScheduler struct { addconsensus chan *enode.Node removeconsensus chan *enode.Node - clearConsensus chan struct{} // Everything below here belongs to loop and // should only be accessed by code on the loop goroutine. @@ -186,7 +185,6 @@ func newDialScheduler(config dialConfig, it enode.Iterator, setupFunc dialSetupF remPeerCh: make(chan *conn), addconsensus: make(chan *enode.Node), removeconsensus: make(chan *enode.Node), - clearConsensus: make(chan struct{}), updateConsensusPeersCh: make(chan int), consensusPool: NewDialedTasks(config.MaxConsensusPeers*2, nil), } @@ -241,13 +239,6 @@ func (d *dialScheduler) removeConsensus(n *enode.Node) { } } -func (d *dialScheduler) closeConsensusDial() { - select { - case d.clearConsensus <- struct{}{}: - case <-d.ctx.Done(): - } -} - func (d *dialScheduler) removeConsensusFromQueue(n *enode.Node) { d.history.remove(string(n.ID().Bytes())) } @@ -355,8 +346,6 @@ loop: d.consensusPool.AddTask(newDialTask(node, dynDialedConn|consensusDialedConn)) case node := <-d.removeconsensus: d.consensusPool.RemoveTask(node.ID()) - case <-d.clearConsensus: - d.consensusPool.clear() case num := <-d.updateConsensusPeersCh: d.log.Debug("update added consensus peers num", "num", num) d.consensusPeers = num