specify topic delivery weights, with priority for blocks

This commit is contained in:
vyzo 2020-09-05 23:46:49 +03:00
parent 453ab95e54
commit c616958557

View File

@ -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 != "" {