From 1bb5586ac8e9de04c6a21b03a3dc8d072973af45 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 | 16 ---------------- dot/sync/errors.go | 6 ------ 2 files changed, 22 deletions(-) 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) -}