les: fix commons protocol maker

This commit is contained in:
Péter Szilágyi 2018-08-17 13:07:51 +03:00 committed by GitHub
parent 202f08781b
commit 56220ca91e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,7 @@ type NodeInfo struct {
// makeProtocols creates protocol descriptors for the given LES versions. // makeProtocols creates protocol descriptors for the given LES versions.
func (c *lesCommons) makeProtocols(versions []uint) []p2p.Protocol { func (c *lesCommons) makeProtocols(versions []uint) []p2p.Protocol {
protos := make([]p2p.Protocol, len(ClientProtocolVersions)) protos := make([]p2p.Protocol, len(versions))
for i, version := range versions { for i, version := range versions {
version := version version := version
protos[i] = p2p.Protocol{ protos[i] = p2p.Protocol{