예제 #1
0
파일: plugin.py 프로젝트: Quiark/populus
def module_rpc_server():
    from testrpc.__main__ import create_server
    from testrpc.testrpc import evm_reset

    server = create_server('127.0.0.1', 8545)

    evm_reset()

    thread = threading.Thread(target=server.serve_forever)
    thread.daemon = True
    thread.start()

    yield server

    server.shutdown()
    server.server_close()
예제 #2
0
def rpc_server():
    from testrpc.__main__ import create_server
    from testrpc.testrpc import evm_reset

    server = create_server('127.0.0.1', 8545)

    evm_reset()

    thread = threading.Thread(target=server.serve_forever)
    thread.daemon = True
    thread.start()

    yield server

    server.shutdown()
    server.server_close()
예제 #3
0
def testrpc_server(request, populus_config):
    from testrpc.__main__ import create_server
    from testrpc.testrpc import evm_reset

    rpc_port = populus_config.get_value(request, 'rpc_server_port')
    rpc_host = populus_config.get_value(request, 'rpc_server_host')

    server = create_server(rpc_host, rpc_port)

    evm_reset()

    thread = threading.Thread(target=server.serve_forever)
    thread.daemon = True
    thread.start()

    yield server

    server.shutdown()
    server.server_close()
예제 #4
0
파일: plugin.py 프로젝트: Cryptix23/populus
def testrpc_server(request, populus_config):
    from testrpc.__main__ import create_server
    from testrpc.testrpc import evm_reset

    rpc_port = populus_config.get_value(request, 'rpc_server_port')
    rpc_host = populus_config.get_value(request, 'rpc_server_host')

    server = create_server(rpc_host, rpc_port)

    evm_reset()

    thread = threading.Thread(target=server.serve_forever)
    thread.daemon = True
    thread.start()

    yield server

    server.shutdown()
    server.server_close()