def instant_geth_dev_node(): geth = NuCypherGethDevProcess() try: yield geth finally: if geth.is_running: geth.stop() assert not geth.is_running
def _get_test_geth_parity_provider(provider_uri) -> BaseProvider: from nucypher.blockchain.eth.interfaces import BlockchainInterface # geth --dev geth_process = NuCypherGethDevProcess() geth_process.start() geth_process.wait_for_ipc(timeout=30) provider = IPCProvider(ipc_path=geth_process.ipc_path, timeout=BlockchainInterface.TIMEOUT) BlockchainInterface.process = geth_process return provider
def _get_test_geth_parity_provider(self): # geth --dev geth_process = NuCypherGethDevProcess() geth_process.start() geth_process.wait_for_ipc(timeout=30) provider = IPCProvider(ipc_path=geth_process.ipc_path, timeout=self.timeout) # TODO: this seems strange to modify a class attr here? BlockchainInterface.process = geth_process return provider
def _get_test_geth_parity_provider(provider_uri): from nucypher.blockchain.eth.interfaces import BlockchainInterface # geth --dev geth_process = NuCypherGethDevProcess() geth_process.start() geth_process.wait_for_ipc(timeout=30) provider = IPCProvider(ipc_path=geth_process.ipc_path, timeout=BlockchainInterface.TIMEOUT) # TODO: this seems strange to modify a class attr here? BlockchainInterface.process = geth_process return provider