mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
network: extend errInvalidInvType error
Add type to the errInvalidInvType. Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
4a5e8f8592
commit
4d6333866d
1 changed files with 1 additions and 1 deletions
|
@ -1353,7 +1353,7 @@ func (s *Server) handleMessage(peer Peer, msg *Message) error {
|
||||||
if peer.Handshaked() {
|
if peer.Handshaked() {
|
||||||
if inv, ok := msg.Payload.(*payload.Inventory); ok {
|
if inv, ok := msg.Payload.(*payload.Inventory); ok {
|
||||||
if !inv.Type.Valid(s.chain.P2PSigExtensionsEnabled()) || len(inv.Hashes) == 0 {
|
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 {
|
switch msg.Command {
|
||||||
|
|
Loading…
Reference in a new issue