Browse Source

p2p: dont require minor versions to match in handshake

pull/1519/head
Ethan Buchman 6 years ago
parent
commit
40c79235c0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      p2p/node_info.go

+ 3
- 3
p2p/node_info.go 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


Loading…
Cancel
Save