routing: rename and export routingGraph

In preparation for structs outside of the `routing` package implementing
this interface, export `routingGraph` and rename it to `Graph` so as to
avoid stuttering.
This commit is contained in:
Elle Mouton committed 2024-07-15 13:10:24 +02:00
1 parent 5a903c270f
commit 3f121cbe81
10 files changed
+50 -50

No files matched your search

+5 -5
View File
@@ -116,10 +116,10 @@ func TestUpdateAdditionalEdge(t *testing.T) {
// Create the paymentsession.
session, err := newPaymentSession(
payment, route.Vertex{},
func(routingGraph) (bandwidthHints, error) {
func(Graph) (bandwidthHints, error) {
return &mockBandwidthHints{}, nil
},
func() (routingGraph, func(), error) {
func() (Graph, func(), error) {
return &sessionGraph{}, func() {}, nil
},
&MissionControl{},
@@ -196,10 +196,10 @@ func TestRequestRoute(t *testing.T) {
session, err := newPaymentSession(
payment, route.Vertex{},
func(routingGraph) (bandwidthHints, error) {
func(Graph) (bandwidthHints, error) {
return &mockBandwidthHints{}, nil
},
func() (routingGraph, func(), error) {
func() (Graph, func(), error) {
return &sessionGraph{}, func() {}, nil
},
&MissionControl{},
@@ -253,7 +253,7 @@ func TestRequestRoute(t *testing.T) {
}
type sessionGraph struct {
routingGraph
Graph
}
func (g *sessionGraph) sourceNode() route.Vertex {