From 9e76def314cec6468e9fac8697f33c9512ab8cf9 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 29 Aug 2022 21:07:01 +0000 Subject: [PATCH] chore(dot): remove unneeded error functions --- dot/core/errors.go | 15 --------------- dot/sync/errors.go | 5 ----- 2 files changed, 20 deletions(-) diff --git a/dot/core/errors.go b/dot/core/errors.go index 10364b84996..efe1cb4b5cb 100644 --- a/dot/core/errors.go +++ b/dot/core/errors.go @@ -46,18 +46,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 a21cbd0d4ff..c46580454ab 100644 --- a/dot/sync/errors.go +++ b/dot/sync/errors.go @@ -48,8 +48,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) -}