mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-18 10:06:51 +01:00
lnd+graph: add GraphSource interface and implementation
This commit adds a new GraphSources interface that LND requires for graph related read-only queries. As of this commit, the interface is empty but it will be populated over the next couple of commits. We add an implementation of this interface backed by a pointer to a graphdb.ChannelGraph. The infrustructure is put into place so that the GraphSoure provided to LND can be overridden by a caller of the lnd.Main function. By default, LND will satisfy the interface itself via the new `graphsource.DBSource` struct.
This commit is contained in:
@@ -1802,6 +1802,7 @@ func (c *Config) ImplementationConfig(
|
||||
),
|
||||
WalletConfigBuilder: rpcImpl,
|
||||
ChainControlBuilder: rpcImpl,
|
||||
GraphProvider: rpcImpl,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1813,6 +1814,7 @@ func (c *Config) ImplementationConfig(
|
||||
DatabaseBuilder: NewDefaultDatabaseBuilder(c, ltndLog),
|
||||
WalletConfigBuilder: defaultImpl,
|
||||
ChainControlBuilder: defaultImpl,
|
||||
GraphProvider: defaultImpl,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user