Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-pubsub
Commits
2e7cdebf
Commit
2e7cdebf
authored
Nov 23, 2019
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace peer exchange
parent
95d3bbfa
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
663 additions
and
773 deletions
+663
-773
pb/trace.pb.go
pb/trace.pb.go
+657
-773
pb/trace.proto
pb/trace.proto
+1
-0
trace.go
trace.go
+5
-0
No files found.
pb/trace.pb.go
View file @
2e7cdebf
This diff is collapsed.
Click to expand it.
pb/trace.proto
View file @
2e7cdebf
...
...
@@ -137,6 +137,7 @@ message TraceEvent {
message
ControlPruneMeta
{
optional
string
topic
=
1
;
repeated
bytes
peers
=
2
;
}
}
...
...
trace.go
View file @
2e7cdebf
...
...
@@ -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
,
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment