Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Dec 2, 2024
1 parent 0452bee commit a622315
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
8 changes: 7 additions & 1 deletion packages/ciphernode/enclave_node/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ pub async fn setup_aggregator(
.build()
.await?;

let (_, join_handle, peer_id) = NetworkManager::setup_with_peer(bus.clone(), config.peers(), &cipher, repositories.libp2pid()).await?;
let (_, join_handle, peer_id) = NetworkManager::setup_with_peer(
bus.clone(),
config.peers(),
&cipher,
repositories.libp2pid(),
)
.await?;

if let Some(path) = pubkey_write_path {
PublicKeyWriter::attach(path, bus.clone());
Expand Down
8 changes: 7 additions & 1 deletion packages/ciphernode/enclave_node/src/ciphernode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ pub async fn setup_ciphernode(
.build()
.await?;

let (_, join_handle, peer_id) = NetworkManager::setup_with_peer(bus.clone(), config.peers(), &cipher, repositories.libp2pid()).await?;
let (_, join_handle, peer_id) = NetworkManager::setup_with_peer(
bus.clone(),
config.peers(),
&cipher,
repositories.libp2pid(),
)
.await?;

let nm = format!("CIPHER({})", &address.to_string()[0..5]);
SimpleLogger::attach(&nm, bus.clone());
Expand Down
4 changes: 2 additions & 2 deletions packages/ciphernode/net/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![crate_name = "net"]
#![crate_type = "lib"]

mod network_peer;
mod network_manager;
mod network_peer;

pub use network_peer::*;
pub use network_manager::*;
pub use network_peer::*;
2 changes: 1 addition & 1 deletion packages/ciphernode/net/src/network_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl NetworkManager {
info!("Generated new keypair {}", kp.public().to_peer_id());
let innerkp = kp.try_into_ed25519()?;
let bytes = innerkp.to_bytes().to_vec();

repository.write(&cipher.encrypt_data(&mut bytes.clone())?);
info!("Saved new keypair to repository");
bytes
Expand Down

0 comments on commit a622315

Please sign in to comment.