mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
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