Skip to content

Commit 35218bc

Browse files
Fix error while exiting massive-replace-script (#2286)
1 parent 4dceb52 commit 35218bc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

services/database/massive-replace-script/config-replace-creation-information.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
-- Exclude unsupported chains
2929
AND cd.chain_id NOT IN (3,4,5,28,43,50,69,77,99,300,420,534,570,592,842,1291,1433,1516,2017,2358,7701,9977,10242,10243,11111,12898,13381,16350,17069,26100,28528,32770,33101,33103,48899,57000,71401,78430,78431,78432,80001,84531,103090,167005,167006,202401,420420,420666,421611,421613,1127469,192837465,222000222,333000333,356256156,486217935,4216137055,7078815900)
3030
-- -- Exclude failing RPC chains
31-
-- AND cd.chain_id NOT IN (40,10200)
31+
AND cd.chain_id NOT IN (40,10200)
3232
AND sm.id >= $1
3333
ORDER BY sm.id ASC
3434
LIMIT $2

services/database/massive-replace-script/massive-replace-script.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ async function processContract(
206206

207207
// Update the counter file only after the batch successfully completes
208208

209+
if (verifiedContractCount === 0) {
210+
console.log("No more contracts to process.");
211+
break;
212+
}
209213
const lastProcessedId =
210214
verifiedContracts[verifiedContracts.length - 1].verified_contract_id;
211215
CURRENT_VERIFIED_CONTRACT = parseInt(lastProcessedId) + 1;

0 commit comments

Comments
 (0)