Merge pull request #5642 from guggero/in-memory-graph
In-memory graph cache for faster pathfinding
This commit is contained in:
65 files changed
+2595
-1171
No files matched your search
@@ -56,7 +56,7 @@ type AddInvoiceConfig struct {
|
||||
|
||||
// ChanDB is a global boltdb instance which is needed to access the
|
||||
// channel graph.
|
||||
ChanDB *channeldb.DB
|
||||
ChanDB *channeldb.ChannelStateDB
|
||||
|
||||
// Graph holds a reference to the ChannelGraph database.
|
||||
Graph *channeldb.ChannelGraph
|
||||
|
||||
@@ -51,7 +51,7 @@ type Config struct {
|
||||
|
||||
// ChanStateDB is a possibly replicated db instance which contains the
|
||||
// channel state
|
||||
ChanStateDB *channeldb.DB
|
||||
ChanStateDB *channeldb.ChannelStateDB
|
||||
|
||||
// GenInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated invoices.
|
||||
|
||||
@@ -55,7 +55,7 @@ type RouterBackend struct {
|
||||
FindRoute func(source, target route.Vertex,
|
||||
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
|
||||
destCustomRecords record.CustomSet,
|
||||
routeHints map[route.Vertex][]*channeldb.ChannelEdgePolicy,
|
||||
routeHints map[route.Vertex][]*channeldb.CachedEdgePolicy,
|
||||
finalExpiry uint16) (*route.Route, error)
|
||||
|
||||
MissionControl MissionControl
|
||||
|
||||
@@ -126,7 +126,7 @@ func testQueryRoutes(t *testing.T, useMissionControl bool, useMsat bool,
|
||||
findRoute := func(source, target route.Vertex,
|
||||
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
|
||||
_ record.CustomSet,
|
||||
routeHints map[route.Vertex][]*channeldb.ChannelEdgePolicy,
|
||||
routeHints map[route.Vertex][]*channeldb.CachedEdgePolicy,
|
||||
finalExpiry uint16) (*route.Route, error) {
|
||||
|
||||
if int64(amt) != amtSat*1000 {
|
||||
|
||||
Reference in new issue
Block a user