Add MerkleBlock deadline to CmdGetData
This commit is contained in:
parent
4f12c97d0f
commit
765ca28711
1 changed files with 5 additions and 1 deletions
|
@ -1227,8 +1227,9 @@ func (p *Peer) maybeAddDeadline(pendingResponses map[string]time.Time, msgCmd st
|
||||||
pendingResponses[wire.CmdInv] = deadline
|
pendingResponses[wire.CmdInv] = deadline
|
||||||
|
|
||||||
case wire.CmdGetData:
|
case wire.CmdGetData:
|
||||||
// Expects a block, tx, or notfound message.
|
// Expects a block, merkleblock, tx, or notfound message.
|
||||||
pendingResponses[wire.CmdBlock] = deadline
|
pendingResponses[wire.CmdBlock] = deadline
|
||||||
|
pendingResponses[wire.CmdMerkleBlock] = deadline
|
||||||
pendingResponses[wire.CmdTx] = deadline
|
pendingResponses[wire.CmdTx] = deadline
|
||||||
pendingResponses[wire.CmdNotFound] = deadline
|
pendingResponses[wire.CmdNotFound] = deadline
|
||||||
|
|
||||||
|
@ -1285,10 +1286,13 @@ out:
|
||||||
switch msgCmd := msg.message.Command(); msgCmd {
|
switch msgCmd := msg.message.Command(); msgCmd {
|
||||||
case wire.CmdBlock:
|
case wire.CmdBlock:
|
||||||
fallthrough
|
fallthrough
|
||||||
|
case wire.CmdMerkleBlock:
|
||||||
|
fallthrough
|
||||||
case wire.CmdTx:
|
case wire.CmdTx:
|
||||||
fallthrough
|
fallthrough
|
||||||
case wire.CmdNotFound:
|
case wire.CmdNotFound:
|
||||||
delete(pendingResponses, wire.CmdBlock)
|
delete(pendingResponses, wire.CmdBlock)
|
||||||
|
delete(pendingResponses, wire.CmdMerkleBlock)
|
||||||
delete(pendingResponses, wire.CmdTx)
|
delete(pendingResponses, wire.CmdTx)
|
||||||
delete(pendingResponses, wire.CmdNotFound)
|
delete(pendingResponses, wire.CmdNotFound)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue