Restore initiator flag to BaseSession type

This commit is contained in:
Alex Stokes
2019-09-08 15:37:41 -04:00
parent f38899e26e
commit 2025a5c7f1
3 changed files with 12 additions and 6 deletions

View File

@ -20,13 +20,14 @@ class BaseSession(ISecureConn):
self,
local_peer: ID,
local_private_key: PrivateKey,
initiator: bool,
peer_id: Optional[ID] = None,
) -> None:
self.local_peer = local_peer
self.local_private_key = local_private_key
self.remote_peer_id = peer_id
self.remote_permanent_pubkey = None
self.initiator = peer_id is not None
self.initiator = initiator
def get_local_peer(self) -> ID:
return self.local_peer