Ejemplo n.º 1
0
    async def test_wallet_finds_full_node(self):
        node_iters = [
            setup_full_node(
                test_constants,
                "blockchain_test.db",
                11234,
                introducer_port=11236,
                simulator=False,
            ),
            setup_wallet_node(
                11235,
                test_constants,
                None,
                introducer_port=11236,
            ),
            setup_introducer(11236),
        ]

        await node_iters[0].__anext__()
        wallet, s2 = await node_iters[1].__anext__()
        await node_iters[2].__anext__()

        async def has_full_node():
            return (wallet.wallet_peers.global_connections.
                    count_outbound_connections() > 0)

        await time_out_assert(
            2 * 60,
            has_full_node,
            True,
        )
        await _teardown_nodes(node_iters)
Ejemplo n.º 2
0
 async def extra_node(self):
     with TempKeyring() as keychain:
         b_tools = await create_block_tools_async(
             constants=test_constants_modified, keychain=keychain)
         async for _ in setup_full_node(test_constants_modified,
                                        "blockchain_test_3.db", 21240,
                                        b_tools):
             yield _
Ejemplo n.º 3
0
 async def extra_node(self):
     b_tools = BlockTools(constants=test_constants_modified)
     async for _ in setup_full_node(test_constants_modified, "blockchain_test_3.db", 21240, b_tools):
         yield _