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
dms3
go-dms3
Commits
3118777a
Commit
3118777a
authored
Jan 26, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p/id: SET listen addrs, clearing old ones.
parent
56d900fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
p2p/protocol/identify/id.go
p2p/protocol/identify/id.go
+3
-2
No files found.
p2p/protocol/identify/id.go
View file @
3118777a
...
@@ -176,8 +176,9 @@ func (ids *IDService) consumeMessage(mes *pb.Identify, c inet.Conn) {
...
@@ -176,8 +176,9 @@ func (ids *IDService) consumeMessage(mes *pb.Identify, c inet.Conn) {
lmaddrs
=
append
(
lmaddrs
,
maddr
)
lmaddrs
=
append
(
lmaddrs
,
maddr
)
}
}
// update our peerstore with the addresses.
// update our peerstore with the addresses. here, we SET the addresses, clearing old ones.
ids
.
Host
.
Peerstore
()
.
AddAddresses
(
p
,
lmaddrs
)
// We are receiving from the peer itself. this is current address ground truth.
ids
.
Host
.
Peerstore
()
.
SetAddresses
(
p
,
lmaddrs
)
log
.
Debugf
(
"%s received listen addrs for %s: %s"
,
c
.
LocalPeer
(),
c
.
RemotePeer
(),
lmaddrs
)
log
.
Debugf
(
"%s received listen addrs for %s: %s"
,
c
.
LocalPeer
(),
c
.
RemotePeer
(),
lmaddrs
)
// get protocol versions
// get protocol versions
...
...
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