// Serve serves the RPC server
Serve serves the RPC server
// Serve serves the RPC server
func Serve(proto string, listenAddr string, mux *chain.ShardMux, c *config.Config, node *p2p.HostNode) error {
	lis, err := net.Listen(proto, listenAddr)
	if err != nil {
		return err
	}
	s := grpc.NewServer()
	pb.RegisterShardRPCServer(s, &ShardRPCServer{mux, node, c})
	reflection.Register(s)
	err = s.Serve(lis)
	return err
}
func Serve ( proto string , listenAddr string , mux * chain . ShardMux , c * config . Config , node * p2p . HostNode ) error { lis , err := net . Listen ( proto , listenAddr ) if err != nil { return err } s := grpc . NewServer ( ) pb . RegisterShardRPCServer ( s , & ShardRPCServer { mux , node , c } ) reflection . Register ( s ) err = s . Serve ( lis ) return err }
Serve serves the RPC server
Serve serves the RPC server
// Register reflection service on gRPC server.