Skip to content

Commit

Permalink
precommit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Param-29 committed Oct 13, 2023
1 parent c57c206 commit a4dd625
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 5 additions & 7 deletions packages/syft/src/syft/service/network/network_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def exchange_credentials_with(
# Verifying if the challenge is valid

try:
remote_node_verify_key.verify_key.verify(random_challenge, challenge_signature)
remote_node_verify_key.verify_key.verify(
random_challenge, challenge_signature
)
except Exception as E:
return SyftError(message=str(E))

Expand Down Expand Up @@ -205,13 +207,11 @@ def add_peer(
remote_client = peer.client_with_context(context=context)
random_challenge = secrets.token_bytes(16)

remote_res = remote_client.api.services.network.ping(
challenge=random_challenge
)
remote_res = remote_client.api.services.network.ping(challenge=random_challenge)

if isinstance(remote_res, SyftError):
return remote_res

challenge_signature = remote_res

# Verifying if the challenge is valid
Expand All @@ -220,8 +220,6 @@ def add_peer(
except Exception as E:
return SyftError(message=str(E))



result = self.stash.update_peer(context.node.verify_key, peer)
if result.is_err():
return SyftError(message=str(result.err()))
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ commands =
bash -c "k3d cluster delete test-gateway-1 || true"
bash -c "k3d cluster delete test-domain-1 || true"
# bash -c "k3d cluster delete test-domain-2 || true"

# Deleting registery & volumes

bash -c "k3d registry delete k3d-registry.localhost || true"
Expand Down Expand Up @@ -710,19 +710,19 @@ commands =
bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-gateway-1 --namespace test-gateway-1
bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-gateway-1 --namespace test-gateway-1
bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-gateway-1 --namespace test-gateway-1


# bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-gateway-1 --namespace test-gateway-1
# bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-gateway-1 --namespace test-gateway-1

# bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-gateway-1 --namespace test-gateway-1
# bash packages/grid/scripts/wait_for.sh service headscale --context k3d-test-gateway-1 --namespace test-gateway-1

# wait for test domain 1
bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-domain-1 --namespace test-domain-1
bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-domain-1 --namespace test-domain-1
bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1


# bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-1 --namespace test-domain-1
# bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1
Expand Down

0 comments on commit a4dd625

Please sign in to comment.