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

@@ -186,20 +186,13 @@ func (m *mockGraph) forEachNodeChannel(nodePub route.Vertex,
IsNode1: nodePub == node1,
OtherNode: peer,
Capacity: channel.capacity,
OutPolicy: &channeldb.ChannelEdgePolicy{
OutPolicySet: true,
InPolicy: &channeldb.CachedEdgePolicy{
ChannelID: channel.id,
Node: &channeldb.LightningNode{
PubKeyBytes: peer,
Features: lnwire.EmptyFeatureVector(),
},
FeeBaseMSat: node.baseFee,
},
InPolicy: &channeldb.ChannelEdgePolicy{
ChannelID: channel.id,
Node: &channeldb.LightningNode{
PubKeyBytes: nodePub,
Features: lnwire.EmptyFeatureVector(),
ToNodePubKey: func() route.Vertex {
return nodePub
},
ToNodeFeatures: lnwire.EmptyFeatureVector(),
FeeBaseMSat: peerNode.baseFee,
},
},