コード例 #1
0
ファイル: manager.py プロジェクト: trinity-project/trinity
def depoistout(address, value):
    channels = get_channelnames_via_address(address)
    success_channel = []
    for channel in channels:
        if channel.state == State.SETTLING.value:
            sender, receiver = split_channel_name(channel.channel_name)
            ch = Channel(sender, receiver)
            ch.close()
            success_channel.append(channel.channel_name)
        else:
            continue
コード例 #2
0
def close_channel(sender_addr, receiver_addr, channel_name):
    """

    :param sender_addr:
    :param receiver_addr:
    :param channel_name:
    :return:
    """
    sender, receiver = split_channel_name(channel_name)
    ch = Channel(sender, receiver)
    return ch.close()