refactor: move graph related DB code to graph/db from channeldb
This is a pure refactor commit. It moves over all the graph related CRUD code from `channeldb` to `graph/db`.
This commit is contained in:
57 files changed
+512
-299
No files matched your search
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
graphdb "github.com/lightningnetwork/lnd/graph/db"
|
||||
"github.com/lightningnetwork/lnd/graph/db/models"
|
||||
"github.com/lightningnetwork/lnd/invoices"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
@@ -75,7 +76,7 @@ type AddInvoiceConfig struct {
|
||||
ChanDB *channeldb.ChannelStateDB
|
||||
|
||||
// Graph holds a reference to the ChannelGraph database.
|
||||
Graph *channeldb.ChannelGraph
|
||||
Graph *graphdb.ChannelGraph
|
||||
|
||||
// GenInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated invoices.
|
||||
|
||||
@@ -6,6 +6,7 @@ package invoicesrpc
|
||||
import (
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
graphdb "github.com/lightningnetwork/lnd/graph/db"
|
||||
"github.com/lightningnetwork/lnd/invoices"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
@@ -53,7 +54,7 @@ type Config struct {
|
||||
|
||||
// GraphDB is a global database instance which is needed to access the
|
||||
// channel graph.
|
||||
GraphDB *channeldb.ChannelGraph
|
||||
GraphDB *graphdb.ChannelGraph
|
||||
|
||||
// ChanStateDB is a possibly replicated db instance which contains the
|
||||
// channel state
|
||||
|
||||
Reference in new issue
Block a user