Commit 2e7cdebf authored by vyzo's avatar vyzo

trace peer exchange

parent 95d3bbfa
This diff is collapsed.
...@@ -137,6 +137,7 @@ message TraceEvent { ...@@ -137,6 +137,7 @@ message TraceEvent {
message ControlPruneMeta { message ControlPruneMeta {
optional string topic = 1; optional string topic = 1;
repeated bytes peers = 2;
} }
} }
......
...@@ -246,8 +246,13 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta { ...@@ -246,8 +246,13 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta {
var prune []*pb.TraceEvent_ControlPruneMeta var prune []*pb.TraceEvent_ControlPruneMeta
for _, ctl := range rpc.Control.Prune { 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{ prune = append(prune, &pb.TraceEvent_ControlPruneMeta{
Topic: ctl.TopicID, Topic: ctl.TopicID,
Peers: peers,
}) })
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment