mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-03 21:33:07 +00:00
fix: use RawID in traceRPCMeta to avoid allocations
This commit is contained in:
parent
9fbf906fb5
commit
f9b2412210
2
trace.go
2
trace.go
@ -344,7 +344,7 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta {
|
||||
var msgs []*pb.TraceEvent_MessageMeta
|
||||
for _, m := range rpc.Publish {
|
||||
msgs = append(msgs, &pb.TraceEvent_MessageMeta{
|
||||
MessageID: []byte(t.idGen.ID(&Message{Message: m})),
|
||||
MessageID: []byte(t.idGen.RawID(m)),
|
||||
Topic: m.Topic,
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user