channeldb/migration13: migrate to mpp structure

This commit migrates the payments in the database to a new structure
that allows for multiple htlcs per payments. The migration introduces a
new sub-bucket that contains a list of htlcs and moves the old single
htlc into that.
This commit is contained in:
Joost Jager committed 2020-03-09 18:31:39 +01:00
1 parent 4cea2d5213
commit 866623e84b
5 files changed
+347

No files matched your search

+6
View File
@@ -14,6 +14,7 @@ import (
"github.com/coreos/bbolt"
"github.com/go-errors/errors"
"github.com/lightningnetwork/lnd/channeldb/migration12"
"github.com/lightningnetwork/lnd/channeldb/migration13"
"github.com/lightningnetwork/lnd/channeldb/migration_01_to_11"
"github.com/lightningnetwork/lnd/clock"
"github.com/lightningnetwork/lnd/lnwire"
@@ -124,6 +125,11 @@ var (
number: 12,
migration: migration12.MigrateInvoiceTLV,
},
{
// Migrate to multi-path payments.
number: 13,
migration: migration13.MigrateMPP,
},
}
// Big endian is the preferred byte order, due to cursor scans over