def _do_client():
     try:
         wait_for_connection('localhost', port, 2)
     except gevent.Timeout:
         success_tracker['client_success'] = False
     else:
         success_tracker['client_success'] = True
 def _do_client():
     try:
         wait_for_connection('localhost', port, 2)
     except gevent.Timeout:
         success_tracker['client_success'] = False
     else:
         success_tracker['client_success'] = True
Exemple #3
0
 def _do_client():
     success_tracker['client_booted'] = True
     try:
         wait_for_connection('localhost', port)
     except Timeout:
         success_tracker['client_success'] = False
     else:
         success_tracker['client_success'] = True
     finally:
         success_tracker['client_exited'] = True
Exemple #4
0
    def __enter__(self):
        if self._running:
            raise ValueError("The TesterChain is already running")

        if self.port is None:
            self.port = get_open_port()

        self.provider = TestRPCProvider(port=self.port)

        testrpc.full_reset()
        testrpc.rpc_configure('eth_mining', False)
        testrpc.rpc_configure('eth_protocolVersion', '0x3f')
        testrpc.rpc_configure('net_version', 1)
        testrpc.evm_mine()

        wait_for_connection('127.0.0.1', self.port)
        self._running = True
        return self
Exemple #5
0
    def __enter__(self):
        if self._running:
            raise ValueError("The TesterChain is already running")

        if self.rpc_port is None:
            self.rpc_port = get_open_port()

        self._running = True

        self.rpc_methods = self.web3.providers[0].server.application.rpc_methods

        self.rpc_methods.full_reset()
        self.rpc_methods.rpc_configure('eth_mining', False)
        self.rpc_methods.rpc_configure('eth_protocolVersion', '0x3f')
        self.rpc_methods.rpc_configure('net_version', 1)
        self.rpc_methods.evm_mine()

        wait_for_connection('127.0.0.1', self.rpc_port)
        return self
Exemple #6
0
    def __enter__(self):
        if self._running:
            raise ValueError("The TesterChain is already running")

        if self.rpc_port is None:
            self.rpc_port = get_open_port()

        self._running = True

        self.rpc_methods = self.web3.currentProvider.server.application.rpc_methods

        self.rpc_methods.full_reset()
        self.rpc_methods.rpc_configure('eth_mining', False)
        self.rpc_methods.rpc_configure('eth_protocolVersion', '0x3f')
        self.rpc_methods.rpc_configure('net_version', 1)
        self.rpc_methods.evm_mine()

        wait_for_connection('127.0.0.1', self.rpc_port)
        return self