Skip to content

Commit

Permalink
network: extend errInvalidInvType error
Browse files Browse the repository at this point in the history
Add type to the errInvalidInvType.

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Jun 5, 2024
1 parent 4a5e8f8 commit 4d63338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/network/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4d63338

Please sign in to comment.