forked from cerc-io/plugeth
eth: remote a superfluous peerSet method
This commit is contained in:
parent
5422fe5125
commit
4755caeb2d
12
eth/peer.go
12
eth/peer.go
@ -243,18 +243,6 @@ func (ps *peerSet) TxLackingPeers(hash common.Hash) []*peer {
|
|||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
// AllPeers retrieves a flat list of all the peers within the set.
|
|
||||||
func (ps *peerSet) AllPeers() []*peer {
|
|
||||||
ps.lock.RLock()
|
|
||||||
defer ps.lock.RUnlock()
|
|
||||||
|
|
||||||
list := make([]*peer, 0, len(ps.peers))
|
|
||||||
for _, p := range ps.peers {
|
|
||||||
list = append(list, p)
|
|
||||||
}
|
|
||||||
return list
|
|
||||||
}
|
|
||||||
|
|
||||||
// BestPeer retrieves the known peer with the currently highest total difficulty.
|
// BestPeer retrieves the known peer with the currently highest total difficulty.
|
||||||
func (ps *peerSet) BestPeer() *peer {
|
func (ps *peerSet) BestPeer() *peer {
|
||||||
ps.lock.RLock()
|
ps.lock.RLock()
|
||||||
|
Loading…
Reference in New Issue
Block a user