mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
graph/db+sqldb: impl PutClosedScid and IsClosedScid
This commit is contained in:
@ -709,3 +709,20 @@ LIMIT 1;
|
||||
DELETE FROM prune_log
|
||||
WHERE block_height >= @start_height
|
||||
AND block_height <= @end_height;
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
closed_scid table queries
|
||||
────────────────────────────────────────────-
|
||||
*/
|
||||
|
||||
-- name: InsertClosedChannel :exec
|
||||
INSERT INTO closed_scids (scid)
|
||||
VALUES ($1)
|
||||
ON CONFLICT (scid) DO NOTHING;
|
||||
|
||||
-- name: IsClosedChannel :one
|
||||
SELECT EXISTS (
|
||||
SELECT 1
|
||||
FROM closed_scids
|
||||
WHERE scid = $1
|
||||
);
|
||||
|
Reference in New Issue
Block a user