Commit Graph

10 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
f0911765af
channeldb: convert to uniformly use new kvdb abstractions
In this commit, we migrate all the code in `channeldb` to only reference
the new `kvdb` package rather than `bbolt` directly.

In many instances, we need to add two version to fetch a bucket as both
read and write when needed. As an example, we add a new
`fetchChanBucketRw` function. This function is identical to
`fetchChanBucket`, but it will be used to fetch the main channel bucket
for all _write_ transactions. We need a new method as you can pass a
write transaction where a read is accepted, but not the other way around
due to the stronger typing of the new `kvdb` package.
2020-03-18 19:34:49 -07:00
Joost Jager
7aa4a7c7fc
channeldb/migration_01_to_11: isolate route structure
Before we change the Hop struct, isolate the code that is used in older
migrations to prevent breaking them.

route.go was taken from commit 6e463c1634061d595953f20813860207e5d485ce
2019-12-12 00:12:17 +01:00
Joost Jager
5d4ceca038
tlv: remove unused error return value
This commit also modifies a previous migration. Because the change is so
limited, we don't consider this a significant risk.
2019-12-04 13:27:29 +01:00
Conner Fromknecht
5e27b5022c
multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
Joost Jager
4486a06b1a
migration_01_to_11: remove version checking for migration tests 2019-10-31 11:25:07 +01:00
Joost Jager
60503d6c44
channeldb/migration_01_to_11: remove unused code 2019-10-31 07:18:36 +01:00
Joost Jager
f5191440c5
channeldb: initialize migrations logger 2019-10-30 08:56:18 +01:00
Joost Jager
43449ca7a7
channeldb/migration_01_to_11: add references to untested migrations 2019-10-29 11:49:33 +01:00
Joost Jager
6913cd64b6
channeldb: reference migrations in package
This commit removes the migrations from channeldb and references those
in the migrations_01_to_11 package. This creates a one-way dependency on
the migrations. Future changes to channeldb won't be able to break
migrations anymore.
2019-10-24 12:49:40 +02:00
Joost Jager
6e463c1634
channeldb: make copy for migrations
This commit is a direct copy of the complete channeldb package. It only
changes the package declaration at the top of every file. We make this
full copy so that review can be focused on the actual changes made.
Otherwise changes may drown in all the file moves.

Linting for the new package is disabled, as it contains lots of
pre-existing issues.
2019-10-24 12:49:38 +02:00