Fix spinx error

This commit is contained in:
lla-dane
2025-08-23 16:07:10 +05:30
parent 8958c0fac3
commit 5bf9c7b537

View File

@ -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()