graph/db+sqldb: batch validation for zombie index migration

Finally, we update the migrateZombieIndex function to use batch
validation just like was done in the previous commits. Here, we
additionally make sure to validate the entire zombie index entry and not
just the SCID.
This commit is contained in:
Elle Mouton
2025-08-13 14:11:40 +02:00
parent a490e03479
commit 5b06474744
5 changed files with 160 additions and 21 deletions

View File

@@ -908,6 +908,12 @@ DO UPDATE SET
node_key_1 = COALESCE(EXCLUDED.node_key_1, graph_zombie_channels.node_key_1),
node_key_2 = COALESCE(EXCLUDED.node_key_2, graph_zombie_channels.node_key_2);
-- name: GetZombieChannelsSCIDs :many
SELECT *
FROM graph_zombie_channels
WHERE version = @version
AND scid IN (sqlc.slice('scids')/*SLICE:scids*/);
-- name: DeleteZombieChannel :execresult
DELETE FROM graph_zombie_channels
WHERE scid = $1