From 2b6972456ba3d2fdb159edab637a96c1738d94fa Mon Sep 17 00:00:00 2001 From: bochaco Date: Thu, 26 Oct 2023 17:45:31 -0300 Subject: [PATCH] chore: use gossipsub signed msgs --- sn_networking/src/driver.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sn_networking/src/driver.rs b/sn_networking/src/driver.rs index 3ad65921b1..5bbbc0d0ea 100644 --- a/sn_networking/src/driver.rs +++ b/sn_networking/src/driver.rs @@ -393,14 +393,12 @@ impl NetworkBuilder { // Gossipsub behaviour // set default parameters for gossipsub - let gossipsub_config = libp2p::gossipsub::ConfigBuilder::default() - .validation_mode(libp2p::gossipsub::ValidationMode::Anonymous) - .build() - .map_err(|err| Error::GossipsubConfigError(err.to_string()))?; + let gossipsub_config = libp2p::gossipsub::Config::default(); // Set the message authenticity - Here we expect the publisher // to sign the message with their key. - let message_authenticity = libp2p::gossipsub::MessageAuthenticity::Anonymous; + let message_authenticity = + libp2p::gossipsub::MessageAuthenticity::Signed(self.keypair.clone()); // build a gossipsub network behaviour let gossipsub: libp2p::gossipsub::Behaviour =