Skip to content

Commit

Permalink
disables peer scoring on public network
Browse files Browse the repository at this point in the history
  • Loading branch information
yhassanzadeh13 committed Dec 14, 2023
1 parent 24127e5 commit d2ece43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion network/p2p/p2pbuilder/gossipsub/gossipSubBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ func (g *Builder) Build(ctx irrecoverable.SignalerContext) (p2p.PubSubAdapter, e

var scoreOpt *scoring.ScoreOption
var scoreTracer p2p.PeerScoreTracer
if g.gossipSubCfg.PeerScoringEnabled {
// currently, peer scoring is not supported for public networks.
if g.gossipSubCfg.PeerScoringEnabled && g.networkType != network.PublicNetwork {
// wires the gossipsub score option to the subscription provider.
subscriptionProvider, err := scoring.NewSubscriptionProvider(&scoring.SubscriptionProviderConfig{
Logger: g.logger,
Expand Down

0 comments on commit d2ece43

Please sign in to comment.