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:
Olaoluwa Osuntokun
2017-11-09 20:22:10 -08:00
parent 040c6bdf22
commit 4ae0b008ed

File diff suppressed because it is too large Load Diff