// supportedVersionsFromMax returns a list of supported versions derived from a
// legacy maximum version value. Note that only versions supported by this
// library are returned. Any newer peer will use allKnownVersions anyway.
supportedVersionsFromMax returns a list of supported versions derived from a
legacy maximum version value. Note that only versions supported by this
library are returned. Any newer peer will use allKnownVersions anyway.
// supportedVersionsFromMax returns a list of supported versions derived from a // legacy maximum version value . Note that only versions supported by this // library are returned . Any newer peer will use allKnownVersions anyway .
func supportedVersionsFromMax(maxVersion uint16) []uint16 {
	versions := make([]uint16, 0, len(allKnownVersions))
	for _, v := range allKnownVersions {
		if v > maxVersion {
			continue
		}
		versions = append(versions, v)
	}
	return versions
}
func supportedVersionsFromMax ( maxVersion uint16 ) [ ] uint16 { versions := make ( [ ] uint16 , 0 , len ( allKnownVersions ) ) for _ , v := range allKnownVersions { if v > maxVersion { continue } versions = append ( versions , v ) } return versions }
supportedVersionsFromMax returns a list of supported versions derived from a
legacy maximum version value.
supportedVersionsFromMax returns a list of supported versions derived from a legacy maximum version value .