From add13c2646cbbe4157fe7a86d0aae26e3d056c3a Mon Sep 17 00:00:00 2001 From: Mak Muftic Date: Wed, 15 Sep 2021 16:05:44 +0200 Subject: [PATCH] Code cleanup --- node/modules/lp2p/pubsub.go | 1 - node/modules/tracer/elasticsearch_transport.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index 6656abf01..905643ed0 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -375,7 +375,6 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { jsonTransport := tracer.NewJsonTracerTransport(out) transports = append(transports, jsonTransport) } - if in.Cfg.ElasticSearchTracer != "" { elasticSearchTransport, err := tracer.NewElasticSearchTransport() if err != nil { diff --git a/node/modules/tracer/elasticsearch_transport.go b/node/modules/tracer/elasticsearch_transport.go index f9cf621eb..4fe8149be 100644 --- a/node/modules/tracer/elasticsearch_transport.go +++ b/node/modules/tracer/elasticsearch_transport.go @@ -48,7 +48,7 @@ func (est *elasticSearchTransport) Transport(event TracerTransportEvent) error { jsonEvent, err := json.Marshal(e) if err != nil { - return fmt.Errorf("error while marshaling peer score: %s", err) + return fmt.Errorf("error while marshaling event: %s", err) } req := esapi.IndexRequest{