diff --git a/base_layer/p2p/src/initialization.rs b/base_layer/p2p/src/initialization.rs index afe0471dc9..dd8e51f15e 100644 --- a/base_layer/p2p/src/initialization.rs +++ b/base_layer/p2p/src/initialization.rs @@ -464,6 +464,11 @@ impl P2pInitializer { connector: PubsubDomainConnector, noise_prologue: Vec, ) -> 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, @@ -471,7 +476,7 @@ impl P2pInitializer { network, node_identity, connector: Some(connector), - noise_prologue, + noise_prologue: noise_prologue_buf, } }