Skip to content

Commit

Permalink
specify topic delivery weights, with priority for blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 5, 2020
1 parent f83d7d6 commit e55b9b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion node/modules/lp2p/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,12 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
}

// validation queue RED
options = append(options, pubsub.WithPeerGater(pubsub.DefaultPeerGaterParams()))
options = append(options, pubsub.WithPeerGater(
pubsub.DefaultPeerGaterParams().WithTopicDeliveryWeights(map[string]float64{
drandTopic: 5,
build.BlocksTopic(in.Nn): 10,
build.MessagesTopic(in.Nn): 1,
})))

// tracer
if in.Cfg.RemoteTracer != "" {
Expand Down

0 comments on commit e55b9b4

Please sign in to comment.