Skip to content

Commit

Permalink
peer: Remove extraneous hasTimestamp check.
Browse files Browse the repository at this point in the history
The upstream project didn't have timestamps in address messages until
a certain protocol version, however that doesn't apply to Decred.  As a
result, it looks like the check for it was updated to just hard code it to
true.  This was accurate, but there is no point in setting something to
true and then turn around and check if it's true one line later.

Consequently, this just removes the check altogether.
  • Loading branch information
davecgh committed Mar 26, 2016
1 parent 22298d4 commit 7a15800
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,8 @@ func (p *peer) updateAddresses(msg *wire.MsgVersion) {
}

// Request known addresses if the server address manager needs
// more and the peer has a protocol version new enough to
// include a timestamp with addresses.
hasTimestamp := true
if p.server.addrManager.NeedMoreAddresses() && hasTimestamp {
// more.
if p.server.addrManager.NeedMoreAddresses() {
p.QueueMessage(wire.NewMsgGetAddr(), nil)
}

Expand Down

0 comments on commit 7a15800

Please sign in to comment.