Skip to content

Commit

Permalink
chore: use gossipsub signed msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
bochaco committed Oct 26, 2023
1 parent 6cc4689 commit 2b69724
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sn_networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 2b69724

Please sign in to comment.