diff --git a/routing/errors.go b/routing/errors.go index 3beac229..a8bd6fba 100644 --- a/routing/errors.go +++ b/routing/errors.go @@ -34,15 +34,6 @@ func (e *routerError) Error() string { // A compile time check to ensure routerError implements the error interface. var _ error = (*routerError)(nil) -// newErr creates a routerError by the given error description and its -// corresponding error code. -func newErr(code errorCode, a interface{}) *routerError { - return &routerError{ - code: code, - err: errors.New(a), - } -} - // newErrf creates a routerError by the given error formatted description and // its corresponding error code. func newErrf(code errorCode, format string, a ...interface{}) *routerError { diff --git a/routing/pathfind_test.go b/routing/pathfind_test.go index deaccb28..de7c16c6 100644 --- a/routing/pathfind_test.go +++ b/routing/pathfind_test.go @@ -36,12 +36,6 @@ const ( // connecting them. basicGraphFilePath = "testdata/basic_graph.json" - // excessiveHopsGraphFilePath is a file path which stores the JSON dump - // of a graph which was previously triggering an erroneous excessive - // hops error. The error has since been fixed, but a test case - // exercising it is kept around to guard against regressions. - excessiveHopsGraphFilePath = "testdata/excessive_hops.json" - // specExampleFilePath is a file path which stores an example which // implementations will use in order to ensure that they're calculating // the payload for each hop in path properly. @@ -443,8 +437,7 @@ func createTestGraphFromChannels(testChannels []*testChannel, source string) ( addNodeWithAlias := func(alias string, features *lnwire.FeatureVector) ( *channeldb.LightningNode, error) { - keyBytes := make([]byte, 32) - keyBytes = []byte{ + keyBytes := []byte{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,