Commit 559cf91d authored by Yusef Napora's avatar Yusef Napora Committed by vyzo

renaming in error messages & local var

parent d860620a
...@@ -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 srr *record.Envelope var spr *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.Warningf("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
} }
srr = envelope spr = envelope
} }
toconnect = append(toconnect, connectInfo{p, srr}) toconnect = append(toconnect, connectInfo{p, spr})
} }
if len(toconnect) == 0 { if len(toconnect) == 0 {
......
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