p2p: dont require minor versions to match in handshake
This commit is contained in:
parent
c23909eecf
commit
40c79235c0
|
@ -56,7 +56,7 @@ func (info NodeInfo) Validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompatibleWith checks if two NodeInfo are compatible with eachother.
|
// CompatibleWith checks if two NodeInfo are compatible with eachother.
|
||||||
// CONTRACT: two nodes are compatible if the major/minor versions match and network match
|
// CONTRACT: two nodes are compatible if the major version matches and network match
|
||||||
// and they have at least one channel in common.
|
// and they have at least one channel in common.
|
||||||
func (info NodeInfo) CompatibleWith(other NodeInfo) error {
|
func (info NodeInfo) CompatibleWith(other NodeInfo) error {
|
||||||
iMajor, iMinor, _, iErr := splitVersion(info.Version)
|
iMajor, iMinor, _, iErr := splitVersion(info.Version)
|
||||||
|
@ -77,9 +77,9 @@ func (info NodeInfo) CompatibleWith(other NodeInfo) error {
|
||||||
return fmt.Errorf("Peer is on a different major version. Got %v, expected %v", oMajor, iMajor)
|
return fmt.Errorf("Peer is on a different major version. Got %v, expected %v", oMajor, iMajor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// minor version must match
|
// minor version can differ
|
||||||
if iMinor != oMinor {
|
if iMinor != oMinor {
|
||||||
return fmt.Errorf("Peer is on a different minor version. Got %v, expected %v", oMinor, iMinor)
|
// ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// nodes must be on the same network
|
// nodes must be on the same network
|
||||||
|
|
Loading…
Reference in New Issue