def start_network(self, network: 'Network'):
    assert network
    self.network = network
    self.config = network.config
    self._add_peers_from_config()
    asyncio.run_coroutine_threadsafe(self.main_loop(), self.network.asyncio_loop)
def start_network(self, network: 'Network'):
    assert network
    self.network = network
    self.config = network.config
    self._add_peers_from_config()
    asyncio.run_coroutine_threadsafe(self.main_loop(), self.network.asyncio_loop)