Added propagation node list sorting and manual delivery sync initiation

This commit is contained in:
Mark Qvist 2023-10-16 01:46:50 +02:00
parent 8d72a83411
commit a3bf538afe
3 changed files with 74 additions and 18 deletions

View file

@ -264,6 +264,12 @@ class Directory:
else:
return DirectoryEntry.UNKNOWN
def pn_trust_level(self, source_hash):
recalled_identity = RNS.Identity.recall(source_hash)
if recalled_identity != None:
associated_node = RNS.Destination.hash_from_name_and_identity("nomadnetwork.node", recalled_identity)
return self.trust_level(associated_node)
def sort_rank(self, source_hash):
if source_hash in self.directory_entries:
return self.directory_entries[source_hash].sort_rank