mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 14:43:03 +02:00
sqldb+graph/db: implement FilterChannelRange
This lets us run `TestFilterChannelRange` against the SQL backends.
This commit is contained in:
@@ -317,6 +317,13 @@ FROM channels c
|
||||
WHERE c.version = $1
|
||||
AND (c.node_id_1 = $2 OR c.node_id_2 = $2);
|
||||
|
||||
-- name: GetPublicV1ChannelsBySCID :many
|
||||
SELECT *
|
||||
FROM channels
|
||||
WHERE node_1_signature IS NOT NULL
|
||||
AND scid >= @start_scid
|
||||
AND scid < @end_scid;
|
||||
|
||||
-- name: ListChannelsWithPoliciesPaginated :many
|
||||
SELECT
|
||||
sqlc.embed(c),
|
||||
@@ -420,6 +427,13 @@ ON CONFLICT (channel_id, node_id, version)
|
||||
WHERE EXCLUDED.last_update > channel_policies.last_update
|
||||
RETURNING id;
|
||||
|
||||
-- name: GetChannelPolicyByChannelAndNode :one
|
||||
SELECT *
|
||||
FROM channel_policies
|
||||
WHERE channel_id = $1
|
||||
AND node_id = $2
|
||||
AND version = $3;
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
channel_policy_extra_types table queries
|
||||
─────────────────────────────────────────────
|
||||
|
Reference in New Issue
Block a user