routing: remove unused code

This commit is contained in:
Andras Banki-Horvath 2020-04-09 20:41:55 +02:00
parent e9d7ba635c
commit 4773ae17d9
2 changed files with 1 additions and 17 deletions

@ -34,15 +34,6 @@ func (e *routerError) Error() string {
// A compile time check to ensure routerError implements the error interface. // A compile time check to ensure routerError implements the error interface.
var _ error = (*routerError)(nil) 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 // newErrf creates a routerError by the given error formatted description and
// its corresponding error code. // its corresponding error code.
func newErrf(code errorCode, format string, a ...interface{}) *routerError { func newErrf(code errorCode, format string, a ...interface{}) *routerError {

@ -36,12 +36,6 @@ const (
// connecting them. // connecting them.
basicGraphFilePath = "testdata/basic_graph.json" 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 // specExampleFilePath is a file path which stores an example which
// implementations will use in order to ensure that they're calculating // implementations will use in order to ensure that they're calculating
// the payload for each hop in path properly. // 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) ( addNodeWithAlias := func(alias string, features *lnwire.FeatureVector) (
*channeldb.LightningNode, error) { *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, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,