From 7a15800bb6ee2b820fe5ad85529065eb57e9d5f2 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 25 Mar 2016 20:52:07 -0500 Subject: [PATCH] peer: Remove extraneous hasTimestamp check. 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. --- peer.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/peer.go b/peer.go index 0038d869..3a8474bd 100644 --- a/peer.go +++ b/peer.go @@ -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) }