mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-04 18:01:57 +01:00
graph/db+sqldb: validate prune log migration using batching
As was done in the previous commits for nodes & channels, we update the migratePruneLog function here so that it validates migrated entries in batches rather than one-by-one.
This commit is contained in:
@@ -952,6 +952,12 @@ FROM graph_prune_log
|
||||
ORDER BY block_height DESC
|
||||
LIMIT 1;
|
||||
|
||||
-- name: GetPruneEntriesForHeights :many
|
||||
SELECT block_height, block_hash
|
||||
FROM graph_prune_log
|
||||
WHERE block_height
|
||||
IN (sqlc.slice('heights')/*SLICE:heights*/);
|
||||
|
||||
-- name: GetPruneHashByHeight :one
|
||||
SELECT block_hash
|
||||
FROM graph_prune_log
|
||||
|
||||
Reference in New Issue
Block a user