From 4d6333866d1e9df48bdb2acd2db3122e4f70c003 Mon Sep 17 00:00:00 2001 From: Ekaterina Pavlova Date: Wed, 5 Jun 2024 14:27:11 +0300 Subject: [PATCH] network: extend errInvalidInvType error Add type to the errInvalidInvType. Signed-off-by: Ekaterina Pavlova --- pkg/network/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/network/server.go b/pkg/network/server.go index 78c0c03c0d..05aebdf0d5 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -1353,7 +1353,7 @@ func (s *Server) handleMessage(peer Peer, msg *Message) error { if peer.Handshaked() { if inv, ok := msg.Payload.(*payload.Inventory); ok { if !inv.Type.Valid(s.chain.P2PSigExtensionsEnabled()) || len(inv.Hashes) == 0 { - return errInvalidInvType + return fmt.Errorf("%w: %s", errInvalidInvType, inv.Type.String()) } } switch msg.Command {