mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 23:21:12 +02:00
channeldb: modify storage of OpenChannel struct to use new codec.go
In this commit we comptely overhaul the existing storage of the OpenChannel struct to use the new common serialization defined within the codec.go file. Additionally, we’ve modified the structure of the channel database on disk. Rather then use the existing prefix based segmentation, everything is now bucket based. This has resulted in much simpler and easier to follow code. The bucket progression is: openChannelBucket -> nodeBucket -> chainBucket -> channelBucket. We add a chainBucket as it’s possible that in the future we may have several channels on distinct chains with a given node. With the above changes, we’re able to delete much of the existing code within the file, drastically reducing its size.
This commit is contained in:
1971
channeldb/channel.go
1971
channeldb/channel.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user