mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-19 14:36:34 -05:00
Cleanup
This commit is contained in:
parent
4ebd4dcc5b
commit
9a01a20ce6
1 changed files with 6 additions and 1 deletions
|
|
@ -287,6 +287,11 @@ class InterfaceAnnounceHandler:
|
|||
signed = flags & self.FLAG_SIGNED
|
||||
encrypted = flags & self.FLAG_ENCRYPTED
|
||||
fullhash = RNS.Identity.full_hash(app_data)
|
||||
hops = RNS.Transport.hops_to(destination_hash)
|
||||
|
||||
if hops > RNS.Transport.PATHFINDER_M-1:
|
||||
RNS.log(f"Ignored discovered interface with invalid hop count", RNS.LOG_PATHING) if RNS.sl(RNS.LOG_PATHING) else None
|
||||
return
|
||||
|
||||
if fullhash in self.invalid_cache:
|
||||
RNS.log(f"Ignored previously discovered interface with insufficient stamp value", RNS.LOG_PATHING) if RNS.sl(RNS.LOG_PATHING) else None
|
||||
|
|
@ -357,7 +362,7 @@ class InterfaceAnnounceHandler:
|
|||
"value": value,
|
||||
"transport_id": RNS.hexrep(unpacked[TRANSPORT_ID], delimit=False),
|
||||
"network_id": RNS.hexrep(announced_identity.hash, delimit=False),
|
||||
"hops": RNS.Transport.hops_to(destination_hash),
|
||||
"hops": hops,
|
||||
"latitude": unpacked[LATITUDE],
|
||||
"longitude": unpacked[LONGITUDE],
|
||||
"height": unpacked[HEIGHT]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue