From a91ffa60d67f8b3fe1f90460e5a3f70ba1e2bb4f Mon Sep 17 00:00:00 2001 From: Matija Petrunic Date: Fri, 17 Sep 2021 12:11:14 +0200 Subject: [PATCH] Set peer id event as string in lotus trace event --- node/modules/tracer/tracer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/modules/tracer/tracer.go b/node/modules/tracer/tracer.go index ad5f5c6b7..7d8d9e2c4 100644 --- a/node/modules/tracer/tracer.go +++ b/node/modules/tracer/tracer.go @@ -29,7 +29,7 @@ const ( type LotusTraceEvent struct { Type pubsub_pb.TraceEvent_Type `json:"type,omitempty"` - PeerID []byte `json:"peerID,omitempty"` + PeerID string `json:"peerID,omitempty"` Timestamp *int64 `json:"timestamp,omitempty"` PeerScores *TraceEvent_PeerScores `json:"peerScores,omitempty"` } @@ -49,7 +49,7 @@ func (lt *lotusTracer) PeerScores(scores map[peer.ID]*pubsub.PeerScoreSnapshot) now := time.Now().UnixNano() evt := &LotusTraceEvent{ Type: *TraceEvent_PEER_SCORES.Enum(), - PeerID: []byte(lt.pid), + PeerID: string(lt.pid), Timestamp: &now, PeerScores: &TraceEvent_PeerScores{ Scores: scores,