forked from cerc-io/plugeth
les: fix p2p.Protocol.PeerInfo (#19472)
This commit is contained in:
parent
c9d9a2d48a
commit
921b3160db
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user