trace peer exchange
This commit is contained in:
parent
95d3bbfa1b
commit
2e7cdebf34
1488
pb/trace.pb.go
1488
pb/trace.pb.go
File diff suppressed because it is too large
Load Diff
|
@ -137,6 +137,7 @@ message TraceEvent {
|
|||
|
||||
message ControlPruneMeta {
|
||||
optional string topic = 1;
|
||||
repeated bytes peers = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
5
trace.go
5
trace.go
|
@ -246,8 +246,13 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta {
|
|||
|
||||
var prune []*pb.TraceEvent_ControlPruneMeta
|
||||
for _, ctl := range rpc.Control.Prune {
|
||||
peers := make([][]byte, 0, len(ctl.Peers))
|
||||
for _, pi := range ctl.Peers {
|
||||
peers = append(peers, pi.PeerID)
|
||||
}
|
||||
prune = append(prune, &pb.TraceEvent_ControlPruneMeta{
|
||||
Topic: ctl.TopicID,
|
||||
Peers: peers,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue