Skip to content

Commit

Permalink
fixes test (#3794)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhassanzadeh13 authored Jan 11, 2023
1 parent 77c9dde commit 1dd0ac7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion insecure/corruptlibp2p/pubsub_adapter_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ func NewCorruptPubSubAdapterConfig(base *p2p.BasePubSubAdapterConfig, opts ...Co
config := &CorruptPubSubAdapterConfig{
withMessageSigning: true,
withStrictSignatureVerification: true,
options: make([]corrupt.Option, 0),
}

for _, opt := range opts {
opt(config)
}

config.options = defaultCorruptPubsubOptions(base, config.withMessageSigning, config.withStrictSignatureVerification)
// Note: we append the default options at the end to make sure that we are not overriding the options provided by the caller.
config.options = append(config.options, defaultCorruptPubsubOptions(base, config.withMessageSigning, config.withStrictSignatureVerification)...)

return config
}
Expand Down

0 comments on commit 1dd0ac7

Please sign in to comment.