mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 15:40:54 +00:00
Add one_to_all_connect
This commit is contained in:
@ -122,3 +122,8 @@ async def connect_some(hosts, degree):
|
|||||||
# await connect(host, neighbor)
|
# await connect(host, neighbor)
|
||||||
|
|
||||||
# j += 1
|
# j += 1
|
||||||
|
|
||||||
|
async def one_to_all_connect(hosts, central_host_index):
|
||||||
|
for i, host in enumerate(hosts):
|
||||||
|
if i != central_host_index:
|
||||||
|
await connect(hosts[central_host_index], host)
|
||||||
|
|||||||
Reference in New Issue
Block a user