Fix lotus tracer being nil when remote tracer is not configured

This commit is contained in:
Matija Petrunic 2021-09-16 15:53:39 +02:00
parent d067bc9f01
commit 9cdc5261c4

View File

@ -409,7 +409,7 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
options = append(options, pubsub.WithPeerScoreInspect(pst.UpdatePeerScore, 10*time.Second)) options = append(options, pubsub.WithPeerScoreInspect(pst.UpdatePeerScore, 10*time.Second))
} else { } else {
// still instantiate a tracer for collecting metrics // still instantiate a tracer for collecting metrics
trw := newTracerWrapper(nil, nil) trw := newTracerWrapper(nil, lt)
options = append(options, pubsub.WithEventTracer(trw)) options = append(options, pubsub.WithEventTracer(trw))
pst := newPeerScoreTracker(nil, in.Sk) pst := newPeerScoreTracker(nil, in.Sk)