def tester_channels(tester_state, tester_nettingcontracts, reveal_timeout): result = list() for first_key, second_key, nettingcontract in tester_nettingcontracts: first_externalstate = ChannelExternalStateTester( tester_state, first_key, unhexlify(nettingcontract.address), ) first_channel = channel_from_nettingcontract( first_key, nettingcontract, first_externalstate, reveal_timeout, ) second_externalstate = ChannelExternalStateTester( tester_state, second_key, unhexlify(nettingcontract.address), ) second_channel = channel_from_nettingcontract( second_key, nettingcontract, second_externalstate, reveal_timeout, ) result.append( (first_key, second_key, nettingcontract, first_channel, second_channel) ) return result
def tester_channels(tester_state, tester_nettingcontracts): result = list() for first_key, second_key, nettingcontract in tester_nettingcontracts: first_externalstate = ChannelExternalStateTester( tester_state, first_key, nettingcontract.address, ) first_channel = channel_from_nettingcontract( first_key, nettingcontract, first_externalstate, DEFAULT_REVEAL_TIMEOUT, ) second_externalstate = ChannelExternalStateTester( tester_state, second_key, nettingcontract.address, ) second_channel = channel_from_nettingcontract( second_key, nettingcontract, second_externalstate, DEFAULT_REVEAL_TIMEOUT, ) result.append( (first_key, second_key, nettingcontract, first_channel, second_channel) ) return result
def tester_channels(tester_state, tester_nettingcontracts): result = list() for first_key, second_key, nettingcontract in tester_nettingcontracts: first_externalstate = ChannelExternalStateTester( tester_state, first_key, nettingcontract.address, ) first_channel = channel_from_nettingcontract( first_key, nettingcontract, first_externalstate, DEFAULT_REVEAL_TIMEOUT, ) second_externalstate = ChannelExternalStateTester( tester_state, second_key, nettingcontract.address, ) second_channel = channel_from_nettingcontract( second_key, nettingcontract, second_externalstate, DEFAULT_REVEAL_TIMEOUT, ) result.append( (first_key, second_key, nettingcontract, first_channel, second_channel) ) return result
def tester_channels(tester_nettingcontracts, reveal_timeout): result = list() for first_key, second_key, nettingcontract in tester_nettingcontracts: first_channel = channel_from_nettingcontract( first_key, nettingcontract, reveal_timeout, ) second_channel = channel_from_nettingcontract( second_key, nettingcontract, reveal_timeout, ) result.append((first_key, second_key, nettingcontract, first_channel, second_channel)) return result