always trust the machine with our public key (ourselves)
This commit is contained in:
parent
1fbcf7b7c2
commit
ea133bc812
1 changed files with 2 additions and 1 deletions
|
@ -53,9 +53,10 @@ class CommunicationManager:
|
|||
public_key_path.write_bytes(self.public_key)
|
||||
|
||||
self._trusted_peers_path = self.manager.storage / "trusted-peers.json"
|
||||
self._trusted_peers: set[str] = set(hashlib.sha256(self.public_key).hexdigest())
|
||||
self._trusted_peers: set[str] = set()
|
||||
if self._trusted_peers_path.exists():
|
||||
self._trusted_peers = set(json.loads(self._trusted_peers_path.read_text()))
|
||||
self.trust_peer(self.public_key)
|
||||
|
||||
self._banned_peers_path = self.manager.storage / "banned-peers.json"
|
||||
self._banned_peers: set[str] = set()
|
||||
|
|
Loading…
Reference in a new issue