mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Add MerkleBlock deadline to CmdGetData
This commit is contained in:
parent
4f12c97d0f
commit
765ca28711
@ -1227,8 +1227,9 @@ func (p *Peer) maybeAddDeadline(pendingResponses map[string]time.Time, msgCmd st
|
||||
pendingResponses[wire.CmdInv] = deadline
|
||||
|
||||
case wire.CmdGetData:
|
||||
// Expects a block, tx, or notfound message.
|
||||
// Expects a block, merkleblock, tx, or notfound message.
|
||||
pendingResponses[wire.CmdBlock] = deadline
|
||||
pendingResponses[wire.CmdMerkleBlock] = deadline
|
||||
pendingResponses[wire.CmdTx] = deadline
|
||||
pendingResponses[wire.CmdNotFound] = deadline
|
||||
|
||||
@ -1285,10 +1286,13 @@ out:
|
||||
switch msgCmd := msg.message.Command(); msgCmd {
|
||||
case wire.CmdBlock:
|
||||
fallthrough
|
||||
case wire.CmdMerkleBlock:
|
||||
fallthrough
|
||||
case wire.CmdTx:
|
||||
fallthrough
|
||||
case wire.CmdNotFound:
|
||||
delete(pendingResponses, wire.CmdBlock)
|
||||
delete(pendingResponses, wire.CmdMerkleBlock)
|
||||
delete(pendingResponses, wire.CmdTx)
|
||||
delete(pendingResponses, wire.CmdNotFound)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user