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:
parent
87182a2ddf
commit
89af747603
1 changed files with 0 additions and 4 deletions
|
@ -1265,10 +1265,6 @@ func (p *Peer) maybeAddDeadline(pendingResponses map[string]time.Time, msgCmd st
|
||||||
// Expects a verack message.
|
// Expects a verack message.
|
||||||
pendingResponses[wire.CmdVerAck] = deadline
|
pendingResponses[wire.CmdVerAck] = deadline
|
||||||
|
|
||||||
case wire.CmdGetAddr:
|
|
||||||
// Expects an addr message.
|
|
||||||
pendingResponses[wire.CmdAddr] = deadline
|
|
||||||
|
|
||||||
case wire.CmdMemPool:
|
case wire.CmdMemPool:
|
||||||
// Expects an inv message.
|
// Expects an inv message.
|
||||||
pendingResponses[wire.CmdInv] = deadline
|
pendingResponses[wire.CmdInv] = deadline
|
||||||
|
|
Loading…
Reference in a new issue