channeldb/graph: add newChannelGraph constructor

This commit is contained in:
Conner Fromknecht 2019-04-01 11:52:11 -07:00
parent ac315fd051
commit ecbb78651a
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -162,6 +162,13 @@ type ChannelGraph struct {
// * LRU cache for edges?
}
// newChannelGraph allocates a new ChannelGraph backed by a DB instance.
func newChannelGraph(db *DB) *ChannelGraph {
return &ChannelGraph{
db: db,
}
}
// Database returns a pointer to the underlying database.
func (c *ChannelGraph) Database() *DB {
return c.db