Ejemplo n.º 1
0
 def request_async(self, method, params):
     request_id = uuid.uuid4()
     self.pending_requests[request_id] = spawn(
         self.request_blocking,
         method,
         params,
     )
     return request_id
Ejemplo n.º 2
0
 def request_async(self, method, params):
     request_id = uuid.uuid4()
     self.pending_requests[request_id] = spawn(
         self.request_blocking,
         method,
         params,
     )
     return request_id
Ejemplo n.º 3
0
 def request_async(self, raw_method, raw_params):
     request_id = self._get_request_id()
     self.pending_requests[request_id] = spawn(
         self.request_blocking,
         raw_method=raw_method,
         raw_params=raw_params,
         request_id=request_id,
     )
     return request_id
Ejemplo n.º 4
0
    def __init__(self, host="127.0.0.1", port=8545, *args, **kwargs):
        if not is_testrpc_available():
            raise Exception("`TestRPCProvider` requires the `eth-testrpc` package to be installed")
        from testrpc.server import get_application

        application = get_application()

        self.server = make_server(
            host,
            port,
            application,
        )

        self.thread = spawn(self.server.serve_forever)
        endpoint_uri = 'http://{0}:{1}'.format(host, port)

        super(TestRPCProvider, self).__init__(endpoint_uri, *args, **kwargs)
Ejemplo n.º 5
0
    def __init__(self, host="127.0.0.1", port=8545, *args, **kwargs):
        if not is_testrpc_available():
            raise Exception(
                "`TestRPCProvider` requires the `eth-testrpc` package to be installed"
            )
        from testrpc.server import get_application

        application = get_application()

        self.server = make_server(
            host,
            port,
            application,
        )

        self.thread = spawn(self.server.serve_forever)
        endpoint_uri = 'http://{0}:{1}'.format(host, port)

        super(TestRPCProvider, self).__init__(endpoint_uri, *args, **kwargs)