les: fix p2p.Protocol.PeerInfo (#19472)

This commit is contained in:
Felföldi Zsolt 2019-04-17 09:57:53 +02:00 committed by Péter Szilágyi
parent c9d9a2d48a
commit 921b3160db

View File

@ -64,7 +64,7 @@ func (c *lesCommons) makeProtocols(versions []uint) []p2p.Protocol {
return c.protocolManager.runPeer(version, p, rw) return c.protocolManager.runPeer(version, p, rw)
}, },
PeerInfo: func(id enode.ID) interface{} { PeerInfo: func(id enode.ID) interface{} {
if p := c.protocolManager.peers.Peer(fmt.Sprintf("%x", id[:8])); p != nil { if p := c.protocolManager.peers.Peer(fmt.Sprintf("%x", id.Bytes())); p != nil {
return p.Info() return p.Info()
} }
return nil return nil