Skip to content

Commit

Permalink
constructor: always set pubsub options
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
  • Loading branch information
magik6k committed Jun 7, 2019
1 parent 7df0356 commit dc23f54
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions core/coreapi/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,9 @@ func configSwarm(swarm config.SwarmConfig, exp config.Experiments) Option {
}

func configPubsub(ps config.PubsubConfig) Option {
var pubsubOptions []pubsub.Option
if ps.DisableSigning {
pubsubOptions = append(pubsubOptions, pubsub.WithMessageSigning(false))
}

if ps.StrictSignatureVerification {
pubsubOptions = append(pubsubOptions, pubsub.WithStrictSignatureVerification(true))
pubsubOptions := []pubsub.Option{
pubsub.WithMessageSigning(!ps.DisableSigning),
pubsub.WithStrictSignatureVerification(ps.StrictSignatureVerification),
}

switch ps.Router {
Expand Down Expand Up @@ -658,7 +654,6 @@ func defaults() settings {
out.components[ProviderKeys] = fx.Provide(simple.NewBlockstoreProvider)
out.components[Reprovider] = fx.Provide(node.SimpleReprovider(node.DefaultReprovideFrequency))


out.components[Exchange] = fx.Provide(offline.Exchange)
out.components[Namesys] = fx.Provide(node.Namesys(0))
out.components[Blockservice] = fx.Provide(node.BlockService)
Expand Down

0 comments on commit dc23f54

Please sign in to comment.