From efd8e05e94b08f0b99560c327907ce698429033f Mon Sep 17 00:00:00 2001 From: Rozengarden Date: Thu, 10 Oct 2024 23:05:43 +0200 Subject: [PATCH] feat: additional functionality for the generator by passing the -u/--update flag when using the -c options the cached block height will get updated --- generator/cli.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/cli.ts b/generator/cli.ts index 321fa5474..76830c1eb 100644 --- a/generator/cli.ts +++ b/generator/cli.ts @@ -48,6 +48,7 @@ program ).choices(Object.values(VOTING_NETWORK)), ) .addOption(new Option('-c, --configFile ', 'path to config file')) + .addOption(new Option('-u, --update', 'when used with -c update block height')) .allowExcessArguments(false) .parse(process.argv); @@ -138,6 +139,9 @@ if (options.configFile) { const module = v2 ? FEATURE_MODULES_V2.find((m) => m.value === feature)! : FEATURE_MODULES_V3.find((m) => m.value === feature)!; + if (options.update) { + poolConfigs[pool]!.cache = await generateDeterministicPoolCache(pool); + } poolConfigs[pool]!.artifacts.push( module.build({ options,