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:
5 files changed
+160
-21
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user