From 89af747603fad09130129fa4688eaab53c0abdba Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sun, 27 Dec 2015 19:46:54 +0100 Subject: [PATCH] peer: remove getaddr msg from stall detection. The getaddr msg is usually replied to with an addr msg, but if the other peer does not have any addresses to share it will not reply at all (instead of replying with an addr msg with 0 addresses). Therefore, the getaddr msg is not guaranteed a reply, so this commit removes it from stall detection to avoid incorrectly kicking such peers. --- peer/peer.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/peer/peer.go b/peer/peer.go index 372433ef..b51f2872 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -1265,10 +1265,6 @@ func (p *Peer) maybeAddDeadline(pendingResponses map[string]time.Time, msgCmd st // Expects a verack message. pendingResponses[wire.CmdVerAck] = deadline - case wire.CmdGetAddr: - // Expects an addr message. - pendingResponses[wire.CmdAddr] = deadline - case wire.CmdMemPool: // Expects an inv message. pendingResponses[wire.CmdInv] = deadline