mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: use Hive.Peer in Hive.PeerInfo function
This commit is contained in:
parent
c0b78b0db6
commit
22ca0b5c82
1 changed files with 1 additions and 3 deletions
|
|
@ -192,9 +192,7 @@ func (h *Hive) NodeInfo() interface{} {
|
|||
// PeerInfo function is used by the p2p.server RPC interface to display
|
||||
// protocol specific information any connected peer referred to by their NodeID
|
||||
func (h *Hive) PeerInfo(id enode.ID) interface{} {
|
||||
h.lock.Lock()
|
||||
p := h.peers[id]
|
||||
h.lock.Unlock()
|
||||
p := h.Peer(id)
|
||||
|
||||
if p == nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue