mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-01 00:17:57 +01:00
sqldb+graph/db: prune graph nodes in a single query
Update the pruneGraphNodes routine to prune the graph nodes in a single query instead of two.
This commit is contained in:
@@ -27,6 +27,7 @@ type Querier interface {
|
||||
DeleteNodeByPubKey(ctx context.Context, arg DeleteNodeByPubKeyParams) (sql.Result, error)
|
||||
DeleteNodeFeature(ctx context.Context, arg DeleteNodeFeatureParams) error
|
||||
DeletePruneLogEntriesInRange(ctx context.Context, arg DeletePruneLogEntriesInRangeParams) error
|
||||
DeleteUnconnectedNodes(ctx context.Context) ([][]byte, error)
|
||||
DeleteZombieChannel(ctx context.Context, arg DeleteZombieChannelParams) (sql.Result, error)
|
||||
FetchAMPSubInvoiceHTLCs(ctx context.Context, arg FetchAMPSubInvoiceHTLCsParams) ([]FetchAMPSubInvoiceHTLCsRow, error)
|
||||
FetchAMPSubInvoices(ctx context.Context, arg FetchAMPSubInvoicesParams) ([]AmpSubInvoice, error)
|
||||
@@ -66,9 +67,6 @@ type Querier interface {
|
||||
GetPublicV1ChannelsBySCID(ctx context.Context, arg GetPublicV1ChannelsBySCIDParams) ([]Channel, error)
|
||||
GetSCIDByOutpoint(ctx context.Context, arg GetSCIDByOutpointParams) ([]byte, error)
|
||||
GetSourceNodesByVersion(ctx context.Context, version int16) ([]GetSourceNodesByVersionRow, error)
|
||||
// Select all nodes that do not have any channels.
|
||||
// Ignore any of our source nodes.
|
||||
GetUnconnectedNodes(ctx context.Context) ([]GetUnconnectedNodesRow, error)
|
||||
// NOTE: this is V1 specific since for V1, disabled is a
|
||||
// simple, single boolean. The proposed V2 policy
|
||||
// structure will have a more complex disabled bit vector
|
||||
|
||||
Reference in New Issue
Block a user