routing: track unifiedPolicyEdge

Preparation so that we can have the inbound fee available
in addition to the outgoing policy.
This commit is contained in:
Joost Jager committed 2024-03-31 18:12:28 +02:00
1 parent a6d4bb5c89
commit e0a080454a
6 files changed
+64 -51

No files matched your search

+9 -7
View File
@@ -212,7 +212,7 @@ func TestRequestRoute(t *testing.T) {
// Override pathfinder with a mock.
session.pathFinder = func(_ *graphParams, r *RestrictParams,
_ *PathFindingConfig, _, _ route.Vertex, _ lnwire.MilliSatoshi,
_ float64, _ int32) ([]*models.CachedEdgePolicy, float64,
_ float64, _ int32) ([]*unifiedEdge, float64,
error) {
// We expect find path to receive a cltv limit excluding the
@@ -221,14 +221,16 @@ func TestRequestRoute(t *testing.T) {
t.Fatal("wrong cltv limit")
}
path := []*models.CachedEdgePolicy{
path := []*unifiedEdge{
{
ToNodePubKey: func() route.Vertex {
return route.Vertex{}
policy: &models.CachedEdgePolicy{
ToNodePubKey: func() route.Vertex {
return route.Vertex{}
},
ToNodeFeatures: lnwire.NewFeatureVector(
nil, nil,
),
},
ToNodeFeatures: lnwire.NewFeatureVector(
nil, nil,
),
},
}