mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
use console script entry for identify demo
This commit is contained in:
@ -61,7 +61,7 @@ async def run(port: int, destination: str) -> None:
|
|||||||
async with host_a.run(listen_addrs=[listen_addr]):
|
async with host_a.run(listen_addrs=[listen_addr]):
|
||||||
print(
|
print(
|
||||||
"First host listening. Run this from another console:\n\n"
|
"First host listening. Run this from another console:\n\n"
|
||||||
f"python identify.py -p {int(port) + 1} "
|
f"identify-demo -p {int(port) + 1} "
|
||||||
f"-d /ip4/{localhost_ip}/tcp/{port}/p2p/{host_a.get_id().pretty()}\n"
|
f"-d /ip4/{localhost_ip}/tcp/{port}/p2p/{host_a.get_id().pretty()}\n"
|
||||||
)
|
)
|
||||||
print("Waiting for incoming identify request...")
|
print("Waiting for incoming identify request...")
|
||||||
@ -98,8 +98,8 @@ async def run(port: int, destination: str) -> None:
|
|||||||
def main() -> None:
|
def main() -> None:
|
||||||
description = """
|
description = """
|
||||||
This program demonstrates the libp2p identify protocol.
|
This program demonstrates the libp2p identify protocol.
|
||||||
First run 'python identify.py -p <PORT>' to start a listener.
|
First run identify-demo -p <PORT>' to start a listener.
|
||||||
Then run 'python identify.py -p <ANOTHER_PORT> -d <DESTINATION>'
|
Then run 'identify-demo <ANOTHER_PORT> -d <DESTINATION>'
|
||||||
where <DESTINATION> is the multiaddress shown by the listener.
|
where <DESTINATION> is the multiaddress shown by the listener.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user