From 0d2bc8f4a6c8b7b209122ecfe63cd528e47c4c7e Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 4 Dec 2020 15:00:20 +0300 Subject: [PATCH] network: remove extra error check from `Message.Encode()` Buffer write error is returned from `Encode()`. --- pkg/network/message.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/network/message.go b/pkg/network/message.go index f17b62658..5934dba38 100644 --- a/pkg/network/message.go +++ b/pkg/network/message.go @@ -248,9 +248,6 @@ func (m *Message) Bytes() ([]byte, error) { if err := m.Encode(w.BinWriter); err != nil { return nil, err } - if w.Err != nil { - return nil, w.Err - } return w.Bytes(), nil }