invoicesrpc: remove invoicerpc server's access to ChannelGraph pointer

Define a new GraphSource interface required by the invoicerpc server and
remove its access to the graphdb.ChannelGraph pointer. Add the new
invoicesrpc.GraphSource interface to the GraphSource interface
and let DBSource implement it.
This commit is contained in:
Elle Mouton
2024-11-11 16:43:38 +02:00
parent 9854bad720
commit 6f3d45f5d9
11 changed files with 124 additions and 60 deletions

View File

@@ -1,9 +1,13 @@
package sources
import "github.com/lightningnetwork/lnd/graph/session"
import (
"github.com/lightningnetwork/lnd/graph/session"
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
)
// GraphSource defines the read-only graph interface required by LND for graph
// related queries.
type GraphSource interface {
session.ReadOnlyGraph
invoicesrpc.GraphSource
}