mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-01 08:29:59 +02:00
Our aim is to completely remove the `channeldb.DB`'s direct dependence on the `graphdb.ChannelGraph` pointer. The only place where it still depends on this pointer is in the `(DB).AddrsForNode(..)` method where it queries both the channel DB and the graph db for the known addresses for the node in question and then combines the results. So, to separate these out, we will define an AddrsForNodes interface in this commit which we will later let both the ChannelGraph and channeldb.DB both implement and we will merge these results outside of the channeldb package. All this commit does is to unify the `AddrSource` interface since this has been defined separately in a couple of places.
channeldb
The channeldb implements the persistent storage engine for lnd
and
generically a data storage layer for the required state within the Lightning
Network. The backing storage engine is
boltdb, an embedded pure-go key-value store
based off of LMDB.
The package implements an object-oriented storage model with queries and mutations flowing through a particular object instance rather than the database itself. The storage implemented by the objects includes: open channels, past commitment revocation states, the channel graph which includes authenticated node and channel announcements, outgoing payments, and invoices
Installation and Updating
$ go get -u github.com/lightningnetwork/lnd/channeldb