Skip to content

Commit

Permalink
add config mode in all init methods
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-calvin committed Feb 2, 2024
1 parent a7a93de commit 97c56a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions infrastructure/zk/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ export async function init(initArgs: InitArgs = DEFAULT_ARGS) {
// A smaller version of `init` that "resets" the localhost environment, for which `init` was already called before.
// It does less and runs much faster.
export async function reinit(validiumMode: boolean) {
process.env.VALIDIUM_MODE = validiumMode.toString();
await announced(`Initializing in ${validiumMode ? 'Validium mode' : 'Roll-up mode'}`);
configMode(validiumMode);

await announced('Setting up containers', up());
await announced('Compiling JS packages', run.yarn());
Expand All @@ -97,8 +96,7 @@ export async function reinit(validiumMode: boolean) {

// A lightweight version of `init` that sets up local databases, generates genesis and deploys precompiled contracts
export async function lightweightInit(validiumMode: boolean) {
process.env.VALIDIUM_MODE = validiumMode.toString();
await announced(`Initializing in ${validiumMode ? 'Validium mode' : 'Roll-up mode'}`);
configMode(validiumMode);

await announced(`Setting up containers`, up());
await announced('Clean rocksdb', clean('db'));
Expand Down

0 comments on commit 97c56a9

Please sign in to comment.