routing+channeldb: migrate MC store to use minimal Route encoding

Add a new mcRoute type that houses the data about a route that MC
actually uses. Then add a migration (channeldb/migration32) that
migrates the existing store from its current serialisation to the new,
more minimal serialisation.
This commit is contained in:
Elle Mouton committed 2024-09-30 11:40:25 +02:00
1 parent 96445f99b4
commit 383a6d274f
9 files changed
+873 -136

No files matched your search

+9 -5
View File
@@ -18,12 +18,16 @@ const testMaxRecords = 2
var (
// mcStoreTestRoute is a test route for the mission control store tests.
mcStoreTestRoute = route.Route{
SourcePubKey: route.Vertex{1},
Hops: []*route.Hop{
mcStoreTestRoute = mcRoute{
totalAmount: lnwire.MilliSatoshi(5),
sourcePubKey: route.Vertex{1},
hops: []*mcHop{
{
PubKeyBytes: route.Vertex{2},
LegacyPayload: true,
pubKeyBytes: route.Vertex{2},
channelID: 4,
amtToFwd: lnwire.MilliSatoshi(7),
hasCustomRecords: true,
hasBlindingPoint: false,
},
},
}