mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Fix spinx error
This commit is contained in:
@ -158,11 +158,12 @@ def get_default_muxer_options() -> TMuxerOptions:
|
|||||||
|
|
||||||
def env_to_send_in_RPC(host: IHost) -> tuple[bytes, bool]:
|
def env_to_send_in_RPC(host: IHost) -> tuple[bytes, bool]:
|
||||||
"""
|
"""
|
||||||
Returns the signed peer record (Envelope) to be sent in an RPC,
|
Return the signed peer record (Envelope) to be sent in an RPC.
|
||||||
by checking whether the host already has a cached signed peer record.
|
|
||||||
If one exists and its addresses match the host's current listen addresses,
|
This function checks whether the host already has a cached signed peer record
|
||||||
the cached envelope is reused. Otherwise, a new signed peer record is created,
|
(SPR). If one exists and its addresses match the host's current listen
|
||||||
cached, and returned.
|
addresses, the cached envelope is reused. Otherwise, a new signed peer record
|
||||||
|
is created, cached, and returned.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
@ -173,13 +174,11 @@ def env_to_send_in_RPC(host: IHost) -> tuple[bytes, bool]:
|
|||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
tuple[bytes, bool]
|
tuple[bytes, bool]
|
||||||
A tuple containing:
|
A 2-tuple where the first element is the serialized envelope (bytes)
|
||||||
- The serialized envelope (bytes) for the signed peer record.
|
for the signed peer record, and the second element is a boolean flag
|
||||||
- A boolean flag indicating whether a new record was created (True)
|
indicating whether a new record was created (True) or an existing cached
|
||||||
or an existing cached one was reused (False).
|
one was reused (False).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
listen_addrs_set = {addr for addr in host.get_addrs()}
|
listen_addrs_set = {addr for addr in host.get_addrs()}
|
||||||
local_env = host.get_peerstore().get_local_record()
|
local_env = host.get_peerstore().get_local_record()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user