multi: use minimal policy in cache

This commit is contained in:
Oliver Gugger
2021-09-21 19:18:22 +02:00
parent 15d3f62d5e
commit 1d1c42f9ba
19 changed files with 629 additions and 227 deletions

View File

@ -217,7 +217,7 @@ func TestRequestRoute(t *testing.T) {
session.pathFinder = func(
g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
source, target route.Vertex, amt lnwire.MilliSatoshi,
finalHtlcExpiry int32) ([]*channeldb.ChannelEdgePolicy, error) {
finalHtlcExpiry int32) ([]*channeldb.CachedEdgePolicy, error) {
// We expect find path to receive a cltv limit excluding the
// final cltv delta (including the block padding).
@ -225,13 +225,14 @@ func TestRequestRoute(t *testing.T) {
t.Fatal("wrong cltv limit")
}
path := []*channeldb.ChannelEdgePolicy{
path := []*channeldb.CachedEdgePolicy{
{
Node: &channeldb.LightningNode{
Features: lnwire.NewFeatureVector(
nil, nil,
),
ToNodePubKey: func() route.Vertex {
return route.Vertex{}
},
ToNodeFeatures: lnwire.NewFeatureVector(
nil, nil,
),
},
}