diff --git a/dot/core/errors.go b/dot/core/errors.go index c9711f6745..468a29032b 100644 --- a/dot/core/errors.go +++ b/dot/core/errors.go @@ -5,7 +5,6 @@ package core import ( "errors" - "fmt" ) var ( @@ -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) -} diff --git a/dot/sync/errors.go b/dot/sync/errors.go index d66525f939..4ca0b4bfc1 100644 --- a/dot/sync/errors.go +++ b/dot/sync/errors.go @@ -5,7 +5,6 @@ package sync import ( "errors" - "fmt" ) var ( @@ -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) -}