Explorar o código

change order of operations

afeiszli %!s(int64=3) %!d(string=hai) anos
pai
achega
86ba127b3b
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      logic/nodes.go

+ 3 - 3
logic/nodes.go

@@ -622,7 +622,7 @@ func GetNetworkServerNodeID(network string) (string, error) {
 
 // validateServer - make sure servers dont change port or address
 func validateServer(currentNode, newNode *models.Node) bool {
-	return (newNode.Address != currentNode.Address ||
-		newNode.ListenPort != currentNode.ListenPort ||
-		newNode.IsServer != "yes")
+	return (newNode.Address == currentNode.Address &&
+		newNode.ListenPort == currentNode.ListenPort &&
+		newNode.IsServer == "yes")
 }