diff --git a/test/suites/smoke/test-old-regressions.ts b/test/suites/smoke/test-old-regressions.ts index 36f7fecd46..c6e0375b5f 100644 --- a/test/suites/smoke/test-old-regressions.ts +++ b/test/suites/smoke/test-old-regressions.ts @@ -34,6 +34,13 @@ class BadBlockRegressionCase { callData: `0x${string}`; } +interface TransactionRegressionCase { + network: Network; + runtime: number; + blockNumber: number; + txHash: `0x${string}`; +} + // Issues/Regressions // MOON-2824 const moon2824: BadBlockRegressionCase = { @@ -177,10 +184,16 @@ describeSuite({ it({ id: "C003", title: "Verify tracing works for transactions generated by all runtime versions", - test: async function () { + test: async function (context) { const network = paraApi.consts.system.version.specName.toString() as Network; - const testSamples = network in samples ? samples[network] : []; - testSamples.forEach(async (sample) => { + const testSamples: TransactionRegressionCase[] = network in samples ? samples[network] : []; + for (const sample of testSamples) { + const chain = (await paraApi.rpc.system.chain()).toString().toLowerCase(); + if (sample.network !== chain) { + log(`Skipping test...`); + context.skip(); + } + log(`Testing sample: ${JSON.stringify(sample.txHash)}`); const traceData = await context.viem().request({ method: "debug_traceTransaction", @@ -195,13 +208,13 @@ describeSuite({ log(`Error found for sample: ${JSON.stringify(sample)}`); throw e; } - }); + } }, }); it({ id: "C004", - title: "Moonriver: eth_getLogs with more than 16 addresses filtered should return logs", + title: "Moonriver: eth_getLogs with more than 1024 addresses filtered should return logs", chainType: "moonriver", test: async function () { const addresses = Array.from({ length: 1024 }, () => generateKeyringPair()).map(