Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tbraun96 committed Dec 18, 2024
1 parent b7dfbf8 commit c0a03fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/networking/src/handlers/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl NetworkService<'_> {
{
let my_peer_id = *self.swarm.local_peer_id();
let msg = my_peer_id.to_bytes();
//let hash = blake3_256(&msg);
match <Curve as KeyType>::sign_with_secret(&mut self.secret_key.clone(), &msg) {
Ok(signature) => {
let handshake = MyBehaviourRequest::Handshake {
Expand Down
3 changes: 0 additions & 3 deletions crates/networking/src/handlers/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ impl NetworkService<'_> {
gadget_logging::trace!("Received handshake from peer: {peer}");
// Verify the signature
let msg = peer.to_bytes();
//let hash = blake3_256(&msg);
let valid = <Curve as KeyType>::verify(&public_key, &msg, &signature);
if !valid {
gadget_logging::warn!("Invalid initial handshake signature from peer: {peer}");
Expand All @@ -109,7 +108,6 @@ impl NetworkService<'_> {
// Send response with our public key
let my_peer_id = self.swarm.local_peer_id();
let msg = my_peer_id.to_bytes();
//let hash = blake3_256(&msg);
match <Curve as KeyType>::sign_with_secret(&mut self.secret_key.clone(), &msg) {
Ok(signature) => self.swarm.behaviour_mut().p2p.send_response(
channel,
Expand Down Expand Up @@ -168,7 +166,6 @@ impl NetworkService<'_> {
} => {
gadget_logging::trace!("Received handshake-ack message from peer: {peer}");
let msg = peer.to_bytes();
//let hash = blake3_256(&msg);
let valid = <Curve as KeyType>::verify(&public_key, &msg, &signature);
if !valid {
gadget_logging::warn!(
Expand Down

0 comments on commit c0a03fb

Please sign in to comment.