diff --git a/dot/core/errors.go b/dot/core/errors.go index 10364b8499..263319b243 100644 --- a/dot/core/errors.go +++ b/dot/core/errors.go @@ -5,7 +5,6 @@ package core import ( "errors" - "fmt" ) var ( @@ -46,18 +45,3 @@ var ( errNilCodeSubstitutedState = errors.New("cannot have nil CodeSubstitutedStat") ) - -// 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 a21cbd0d4f..770b1fdfb0 100644 --- a/dot/sync/errors.go +++ b/dot/sync/errors.go @@ -5,7 +5,6 @@ package sync import ( "errors" - "fmt" ) var ( @@ -48,8 +47,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) -}