channeldb/migration: add migration for new payment bucket structure
migrateOutgoingPayments moves the OutgoingPayments into a new bucket format where they all reside in a top-level bucket indexed by the payment hash. In this sub-bucket we store information relevant to this payment, such as the payment status. To avoid that the router resend payments that have the status InFlight (we cannot resume these payments for pre-migration payments) we delete those statuses, so only Completed payments remain in the new bucket structure.
This commit is contained in:
2 files changed
+203
No files matched your search
@@ -96,6 +96,13 @@ var (
|
||||
number: 8,
|
||||
migration: migrateGossipMessageStoreKeys,
|
||||
},
|
||||
{
|
||||
// The DB version where the payments and payment
|
||||
// statuses are moved to being stored in a combined
|
||||
// bucket.
|
||||
number: 9,
|
||||
migration: migrateOutgoingPayments,
|
||||
},
|
||||
}
|
||||
|
||||
// Big endian is the preferred byte order, due to cursor scans over
|
||||
|
||||
Reference in new issue
Block a user