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
559cf91d
Commit
559cf91d
authored
Jan 27, 2020
by
Yusef Napora
Committed by
vyzo
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming in error messages & local var
parent
d860620a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
gossipsub.go
gossipsub.go
+6
-6
No files found.
gossipsub.go
View file @
559cf91d
...
@@ -306,27 +306,27 @@ func (gs *GossipSubRouter) pxConnect(peers []*pb.PeerInfo) {
...
@@ -306,27 +306,27 @@ func (gs *GossipSubRouter) pxConnect(peers []*pb.PeerInfo) {
continue
continue
}
}
var
s
r
r
*
record
.
Envelope
var
s
p
r
*
record
.
Envelope
if
pi
.
SignedPeerRecord
!=
nil
{
if
pi
.
SignedPeerRecord
!=
nil
{
// the peer sent us a signed record; ensure that it is valid
// the peer sent us a signed record; ensure that it is valid
envelope
,
r
,
err
:=
record
.
ConsumeEnvelope
(
pi
.
SignedPeerRecord
,
peer
.
PeerRecordEnvelopeDomain
)
envelope
,
r
,
err
:=
record
.
ConsumeEnvelope
(
pi
.
SignedPeerRecord
,
peer
.
PeerRecordEnvelopeDomain
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Warn
ing
f
(
"error unmarshalling
routing
record obtained through px: %s"
,
err
)
log
.
Warnf
(
"error unmarshalling
peer
record obtained through px: %s"
,
err
)
continue
continue
}
}
rec
,
ok
:=
r
.
(
*
peer
.
PeerRecord
)
rec
,
ok
:=
r
.
(
*
peer
.
PeerRecord
)
if
!
ok
{
if
!
ok
{
log
.
Warnf
(
"bogus
routing
record obtained through px: envelope payload is not PeerRecord"
)
log
.
Warnf
(
"bogus
peer
record obtained through px: envelope payload is not PeerRecord"
)
continue
continue
}
}
if
rec
.
PeerID
!=
p
{
if
rec
.
PeerID
!=
p
{
log
.
Warnf
(
"bogus
routing
record obtained through px: peer ID %s doesn't match expected peer %s"
,
rec
.
PeerID
,
p
)
log
.
Warnf
(
"bogus
peer
record obtained through px: peer ID %s doesn't match expected peer %s"
,
rec
.
PeerID
,
p
)
continue
continue
}
}
s
r
r
=
envelope
s
p
r
=
envelope
}
}
toconnect
=
append
(
toconnect
,
connectInfo
{
p
,
s
r
r
})
toconnect
=
append
(
toconnect
,
connectInfo
{
p
,
s
p
r
})
}
}
if
len
(
toconnect
)
==
0
{
if
len
(
toconnect
)
==
0
{
...
...
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