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

+3 -3
View File
@@ -208,7 +208,7 @@ type MissionControlPairSnapshot struct {
type paymentResult struct {
id uint64
timeFwd, timeReply time.Time
route *route.Route
route *mcRoute
success bool
failureSourceIdx *int
failure lnwire.FailureMessage
@@ -438,7 +438,7 @@ func (m *MissionControl) ReportPaymentFail(paymentID uint64, rt *route.Route,
id: paymentID,
failureSourceIdx: failureSourceIdx,
failure: failure,
route: rt,
route: extractMCRoute(rt),
}
return m.processPaymentResult(result)
@@ -456,7 +456,7 @@ func (m *MissionControl) ReportPaymentSuccess(paymentID uint64,
timeReply: timestamp,
id: paymentID,
success: true,
route: rt,
route: extractMCRoute(rt),
}
_, err := m.processPaymentResult(result)