p2p: dont require minor versions to match in handshake

This commit is contained in:
Ethan Buchman 2018-04-28 13:09:17 -04:00
parent c23909eecf
commit 40c79235c0
1 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ func (info NodeInfo) Validate() error {
}
// 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.
func (info NodeInfo) CompatibleWith(other NodeInfo) error {
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)
}
// minor version must match
// minor version can differ
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