mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Add RoutedHostFactory
And skip the tests for `RoutedHost` for now, since there are too many to be fixed in `Kademlia`, and it's not that necessary now.
This commit is contained in:
@ -61,15 +61,15 @@ async def set_up_nodes_by_transport_and_disc_opt(
|
||||
|
||||
|
||||
async def set_up_routers(
|
||||
router_confs: Tuple[int, int] = (0, 0)
|
||||
router_ports: Tuple[int, ...] = (0, 0)
|
||||
) -> List[KadmeliaPeerRouter]:
|
||||
"""The default ``router_confs`` selects two free ports local to this
|
||||
machine."""
|
||||
bootstrap_node = KademliaServer() # type: ignore
|
||||
await bootstrap_node.listen(router_confs[0])
|
||||
await bootstrap_node.listen(router_ports[0])
|
||||
|
||||
routers = [KadmeliaPeerRouter(bootstrap_node)]
|
||||
for port in router_confs[1:]:
|
||||
for port in router_ports[1:]:
|
||||
node = KademliaServer() # type: ignore
|
||||
await node.listen(port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user