Skip to content

Commit

Permalink
fix merge err
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaley committed Apr 22, 2024
1 parent d55fad3 commit 66be6d9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions p2p/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
}
Expand Down Expand Up @@ -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()))
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66be6d9

Please sign in to comment.