Skip to content

Commit

Permalink
disable pubsub signatures and verification (#2339)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon authored and terencechain committed Apr 22, 2019
1 parent 8ada0e5 commit d00350b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shared/p2p/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ func NewServer(cfg *ServerConfig) (*Server, error) {
// distributed hash table by their peer ID.
h = rhost.Wrap(h, dht)

psOpts := []pubsub.Option{
pubsub.WithMessageSigning(false),
pubsub.WithStrictSignatureVerification(false),
}
var gsub *pubsub.PubSub
if featureconfig.FeatureConfig().DisableGossipSub {
gsub, err = pubsub.NewFloodSub(ctx, h)
gsub, err = pubsub.NewFloodSub(ctx, h, psOpts...)
} else {
gsub, err = pubsub.NewGossipSub(ctx, h)
gsub, err = pubsub.NewGossipSub(ctx, h, psOpts...)
}
if err != nil {
cancel()
Expand Down

0 comments on commit d00350b

Please sign in to comment.