channeldb/graph: add newChannelGraph constructor

This commit is contained in:
Conner Fromknecht committed 2019-04-01 16:25:30 -07:00
1 parent ac315fd051
commit ecbb78651a
1 file changed
+7
+7
View File
@@ -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