Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dot): remove unneeded error functions #2790

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Down Expand Up @@ -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)
}
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 @@ -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)
}