les: fix peer id and reply error handling (#19289)

* les: fixed peer id format

* les: fixed peer reply error handling
This commit is contained in:
Felföldi Zsolt
2019-03-20 09:35:05 +01:00
committed by Péter Szilágyi
parent e7d1867964
commit c53c5e616f
2 changed files with 11 additions and 4 deletions

View File

@ -98,15 +98,14 @@ type peer struct {
}
func newPeer(version int, network uint64, isTrusted bool, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {
id := p.ID()
return &peer{
Peer: p,
rw: rw,
version: version,
network: network,
id: fmt.Sprintf("%x", id),
id: fmt.Sprintf("%x", p.ID().Bytes()),
isTrusted: isTrusted,
errCh: make(chan error, 1),
}
}