From 40c79235c0829f8654644a6852e13fc040d06754 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 28 Apr 2018 13:09:17 -0400 Subject: [PATCH] p2p: dont require minor versions to match in handshake --- p2p/node_info.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/node_info.go b/p2p/node_info.go index e46236188..73af1a4af 100644 --- a/p2p/node_info.go +++ b/p2p/node_info.go @@ -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