network: don't compress Inventory messages
They're not really compressable.
This commit is contained in:
parent
9c5ef8d234
commit
120c4d4406
1 changed files with 2 additions and 1 deletions
|
@ -213,7 +213,8 @@ func (m *Message) tryCompressPayload() error {
|
|||
compressedPayload := buf.Bytes()
|
||||
if m.Flags&Compressed == 0 {
|
||||
switch m.Payload.(type) {
|
||||
case *payload.Headers, *payload.MerkleBlock, *payload.NullPayload:
|
||||
case *payload.Headers, *payload.MerkleBlock, *payload.NullPayload,
|
||||
*payload.Inventory:
|
||||
break
|
||||
default:
|
||||
size := len(compressedPayload)
|
||||
|
|
Loading…
Reference in a new issue