test_token_networks.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:raiden 作者: raiden-network 项目源码 文件源码
def test_leaving(raiden_network, token_addresses):
    token_address = token_addresses[0]
    connection_managers = [
        app.raiden.connection_manager_for_token(token_address) for app in raiden_network
    ]

    all_channels = list(
        itertools.chain.from_iterable(
            connection_manager.receiving_channels for connection_manager in connection_managers
        )
    )

    leaving_async = [
        app.raiden.leave_all_token_networks_async() for app in raiden_network[1:]
    ]

    gevent.wait(leaving_async, timeout=50)

    assert not connection_managers[0].receiving_channels
    assert all(
        channel.state == CHANNEL_STATE_SETTLED
        for channel in all_channels
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号