mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 20:33:07 +02:00
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:
@@ -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