channeldb+invoices: add invoice htlcs
This commit adds a set of htlcs to the Invoice struct and serializes/deserializes this set to/from disk. It is a preparation for accurate invoice accounting across restarts of lnd. A migration is added for the invoice htlcs. In addition to these changes, separate final cltv delta and expiry invoice fields are created and populated. Previously it was required to decode this from the stored payment request. The reason to create a combined commit is to prevent multiple migrations.
This commit is contained in:
8 files changed
+633
-4
No files matched your search
@@ -110,6 +110,11 @@ var (
|
||||
number: 10,
|
||||
migration: migrateRouteSerialization,
|
||||
},
|
||||
{
|
||||
// Add invoice htlc and cltv delta fields.
|
||||
number: 11,
|
||||
migration: migrateInvoices,
|
||||
},
|
||||
}
|
||||
|
||||
// Big endian is the preferred byte order, due to cursor scans over
|
||||
|
||||
Reference in new issue
Block a user