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
)
评论列表
文章目录