multi: rename local and remote chan DBs
As a preparation to not have a local and remote version of the database around anymore, we rename the variables into what their actual function is. In case of the RPC server we even directly use the channel graph instead of the DB instance. This should allow us to extract the channel graph into its own, separate database (perhaps with better access characteristics) in the future.
This commit is contained in:
10 files changed
+149
-153
No files matched your search
@@ -44,13 +44,13 @@ type Config struct {
|
||||
// specified.
|
||||
DefaultCLTVExpiry uint32
|
||||
|
||||
// LocalChanDB is a global boltdb instance which is needed to access the
|
||||
// GraphDB is a global database instance which is needed to access the
|
||||
// channel graph.
|
||||
LocalChanDB *channeldb.DB
|
||||
GraphDB *channeldb.ChannelGraph
|
||||
|
||||
// RemoteChanDB is a replicatd db instance which is the same as the
|
||||
// localdb when running without remote db.
|
||||
RemoteChanDB *channeldb.DB
|
||||
// ChanStateDB is a possibly replicated db instance which contains the
|
||||
// channel state
|
||||
ChanStateDB *channeldb.DB
|
||||
|
||||
// GenInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated invoices.
|
||||
|
||||
@@ -316,8 +316,8 @@ func (s *Server) AddHoldInvoice(ctx context.Context,
|
||||
ChainParams: s.cfg.ChainParams,
|
||||
NodeSigner: s.cfg.NodeSigner,
|
||||
DefaultCLTVExpiry: s.cfg.DefaultCLTVExpiry,
|
||||
ChanDB: s.cfg.RemoteChanDB,
|
||||
Graph: s.cfg.LocalChanDB.ChannelGraph(),
|
||||
ChanDB: s.cfg.ChanStateDB,
|
||||
Graph: s.cfg.GraphDB,
|
||||
GenInvoiceFeatures: s.cfg.GenInvoiceFeatures,
|
||||
GenAmpInvoiceFeatures: s.cfg.GenAmpInvoiceFeatures,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user