mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user