Set peer id event as string in lotus trace event
This commit is contained in:
parent
dc79ea363d
commit
a91ffa60d6
@ -29,7 +29,7 @@ const (
|
|||||||
|
|
||||||
type LotusTraceEvent struct {
|
type LotusTraceEvent struct {
|
||||||
Type pubsub_pb.TraceEvent_Type `json:"type,omitempty"`
|
Type pubsub_pb.TraceEvent_Type `json:"type,omitempty"`
|
||||||
PeerID []byte `json:"peerID,omitempty"`
|
PeerID string `json:"peerID,omitempty"`
|
||||||
Timestamp *int64 `json:"timestamp,omitempty"`
|
Timestamp *int64 `json:"timestamp,omitempty"`
|
||||||
PeerScores *TraceEvent_PeerScores `json:"peerScores,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()
|
now := time.Now().UnixNano()
|
||||||
evt := &LotusTraceEvent{
|
evt := &LotusTraceEvent{
|
||||||
Type: *TraceEvent_PEER_SCORES.Enum(),
|
Type: *TraceEvent_PEER_SCORES.Enum(),
|
||||||
PeerID: []byte(lt.pid),
|
PeerID: string(lt.pid),
|
||||||
Timestamp: &now,
|
Timestamp: &now,
|
||||||
PeerScores: &TraceEvent_PeerScores{
|
PeerScores: &TraceEvent_PeerScores{
|
||||||
Scores: scores,
|
Scores: scores,
|
||||||
|
Loading…
Reference in New Issue
Block a user