示例#1
0
def instant_geth_dev_node():
    geth = NuCypherGethDevProcess()
    try:
        yield geth
    finally:
        if geth.is_running:
            geth.stop()
            assert not geth.is_running
示例#2
0
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
示例#3
0
    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
示例#4
0
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