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.
This commit is contained in:
Dario Nieuwenhuis 2015-12-27 19:46:54 +01:00
parent 87182a2ddf
commit 89af747603

View file

@ -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