Browse Source

bug squashin

worker-9 4 years ago
parent
commit
18d1a72dd8
2 changed files with 5 additions and 5 deletions
  1. 1 1
      controllers/nodeGrpcController.go
  2. 4 4
      main.go

+ 1 - 1
controllers/nodeGrpcController.go

@@ -162,7 +162,7 @@ func (s *NodeServiceServer) GetExtPeers(ctx context.Context, req *nodepb.Object)
 	if len(macAndNetwork) != 2 {
 	if len(macAndNetwork) != 2 {
 		return nil, errors.New("did not receive valid node id when fetching ext peers")
 		return nil, errors.New("did not receive valid node id when fetching ext peers")
 	}
 	}
-	peers, err := GetExtPeersList(macAndNetwork[1], macAndNetwork[2])
+	peers, err := GetExtPeersList(macAndNetwork[0], macAndNetwork[1])
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}

+ 4 - 4
main.go

@@ -115,7 +115,6 @@ func runGRPC(wg *sync.WaitGroup) {
 
 
 	s := grpc.NewServer(
 	s := grpc.NewServer(
 		authServerUnaryInterceptor(),
 		authServerUnaryInterceptor(),
-		authServerStreamInterceptor(),
 	)
 	)
 	// Create NodeService type
 	// Create NodeService type
 	srv := &controller.NodeServiceServer{}
 	srv := &controller.NodeServiceServer{}
@@ -154,6 +153,7 @@ func runGRPC(wg *sync.WaitGroup) {
 func authServerUnaryInterceptor() grpc.ServerOption {
 func authServerUnaryInterceptor() grpc.ServerOption {
 	return grpc.UnaryInterceptor(controller.AuthServerUnaryInterceptor)
 	return grpc.UnaryInterceptor(controller.AuthServerUnaryInterceptor)
 }
 }
-func authServerStreamInterceptor() grpc.ServerOption {
-	return grpc.StreamInterceptor(controller.AuthServerStreamInterceptor)
-}
+
+// func authServerStreamInterceptor() grpc.ServerOption {
+// 	return grpc.StreamInterceptor(controller.AuthServerStreamInterceptor)
+// }