channeldb: store unknown policies in database
The commit ensures that for every channel, there will always be two entries in the edges bucket. If the policy from one or both ends of the channel is unknown, it is marked as such. This allows efficient lookup of incoming edges. This is required for backwards payment path finding.
This commit is contained in:
1 parent
d2612e51bd
commit
6c918a1806
7 files changed
+322
-43
No files matched your search
@@ -59,6 +59,14 @@ var (
|
||||
number: 3,
|
||||
migration: migrateInvoiceTimeSeriesOutgoingPayments,
|
||||
},
|
||||
{
|
||||
// The version of the database where every channel
|
||||
// always has two entries in the edges bucket. If
|
||||
// a policy is unknown, this will be represented
|
||||
// by a special byte sequence.
|
||||
number: 4,
|
||||
migration: migrateEdgePolicies,
|
||||
},
|
||||
}
|
||||
|
||||
// Big endian is the preferred byte order, due to cursor scans over
|
||||
|
||||
Reference in new issue
Block a user