routing: remove sourceNode from routingGraph interface

In this commit, we further reduce the routingGraph interface and this
time we make it more node-agnostic so that it can be backed by any graph
and not one with a concept of "sourceNode".
This commit is contained in:
Elle Mouton committed 2024-07-15 13:10:24 +02:00
1 parent 5c18b5a042
commit 5a903c270f
8 files changed
+24 -32

No files matched your search

+5 -5
View File
@@ -115,7 +115,7 @@ func TestUpdateAdditionalEdge(t *testing.T) {
// Create the paymentsession.
session, err := newPaymentSession(
payment,
payment, route.Vertex{},
func(routingGraph) (bandwidthHints, error) {
return &mockBandwidthHints{}, nil
},
@@ -195,7 +195,7 @@ func TestRequestRoute(t *testing.T) {
}
session, err := newPaymentSession(
payment,
payment, route.Vertex{},
func(routingGraph) (bandwidthHints, error) {
return &mockBandwidthHints{}, nil
},
@@ -211,9 +211,9 @@ func TestRequestRoute(t *testing.T) {
// Override pathfinder with a mock.
session.pathFinder = func(_ *graphParams, r *RestrictParams,
_ *PathFindingConfig, _, _ route.Vertex, _ lnwire.MilliSatoshi,
_ float64, _ int32) ([]*unifiedEdge, float64,
error) {
_ *PathFindingConfig, _, _, _ route.Vertex,
_ lnwire.MilliSatoshi, _ float64, _ int32) ([]*unifiedEdge,
float64, error) {
// We expect find path to receive a cltv limit excluding the
// final cltv delta (including the block padding).