Skip to content

Commit

Permalink
chore(dot): remove unneeded error functions (#2790)
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 authored and timwu20 committed Sep 12, 2022
1 parent ac700f8 commit ff6538f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
16 changes: 0 additions & 16 deletions dot/core/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package core

import (
"errors"
"fmt"
)

var (
Expand All @@ -23,18 +22,3 @@ var (
// ErrEmptyRuntimeCode is returned when the storage :code is empty
ErrEmptyRuntimeCode = errors.New("new :code is empty")
)

// ErrNilChannel is returned if a channel is nil
func ErrNilChannel(s string) error {
return fmt.Errorf("cannot have nil channel %s", s)
}

// ErrMessageCast is returned if unable to cast a network.Message to a type
func ErrMessageCast(s string) error {
return fmt.Errorf("could not cast network.Message to %s", s)
}

// ErrUnsupportedMsgType is returned if we receive an unknown message type
func ErrUnsupportedMsgType(d byte) error {
return fmt.Errorf("received unsupported message type %d", d)
}
6 changes: 0 additions & 6 deletions dot/sync/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package sync

import (
"errors"
"fmt"
)

var (
Expand Down Expand Up @@ -40,8 +39,3 @@ var (
errStartAndEndMismatch = errors.New("request start and end hash are not on the same chain")
errFailedToGetDescendant = errors.New("failed to find descendant block")
)

// ErrNilChannel is returned if a channel is nil
func ErrNilChannel(s string) error {
return fmt.Errorf("cannot have nil channel %s", s)
}

0 comments on commit ff6538f

Please sign in to comment.