event_handler.py 文件源码

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

项目:raiden 作者: raiden-network 项目源码 文件源码
def handle_balance(self, state_change):
        channel_address = state_change.channel_address
        token_address = state_change.token_address
        participant_address = state_change.participant_address
        balance = state_change.balance

        graph = self.raiden.token_to_channelgraph[token_address]
        channel = graph.address_to_channel[channel_address]

        channel.state_transition(state_change)

        if channel.contract_balance == 0:
            connection_manager = self.raiden.connection_manager_for_token(
                token_address
            )

            gevent.spawn(
                connection_manager.join_channel,
                participant_address,
                balance
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号