Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Aug 23, 2024
1 parent ef403fc commit bebb9ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base_layer/p2p/src/initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,19 @@ impl P2pInitializer {
connector: PubsubDomainConnector,
noise_prologue: Vec<u8>,
) -> Self {
const PREFIX: &[u8] = b"com.tari.comms.noise.";
let mut noise_prologue_buf = vec![0u8; PREFIX.len() + noise_prologue.len()];
noise_prologue_buf[..PREFIX.len()].copy_from_slice(PREFIX);
noise_prologue_buf[PREFIX.len()..].copy_from_slice(&noise_prologue);

Self {
config,
user_agent,
seed_config,
network,
node_identity,
connector: Some(connector),
noise_prologue,
noise_prologue: noise_prologue_buf,
}
}

Expand Down

0 comments on commit bebb9ff

Please sign in to comment.