Skip to content

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
slowli committed Feb 15, 2024
1 parent f1b4431 commit 8d2b5ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/bin/external_node/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub(crate) async fn ensure_storage_initialized(
SnapshotsApplierOutcome::InitializedWithoutSnapshot => {
anyhow::bail!(
"Node contains a non-genesis L1 batch, but no genesis; snapshot recovery is unsafe. \
This should never occur unless the node DB was manually tampered with"
This should never occur unless the node DB was manually tampered with"
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe('snapshot recovery', () => {
const logs = await fs.open('snapshot-recovery.log', 'a');
await logs.truncate();

const enProcess = spawn('zk external-node --enable-snapshots-recovery', {
const enProcess = spawn('zk external-node -- --enable-snapshots-recovery', {
cwd: homeDir,
stdio: [null, 'pipe', 'inherit'],
shell: true,
Expand Down
7 changes: 2 additions & 5 deletions infrastructure/zk/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ export async function server(rebuildTree: boolean, uring: boolean, components?:
await utils.spawn(`cargo run --bin zksync_server --release ${options}`);
}

export async function externalNode(
reinit: boolean = false,
args: string[]
) {
export async function externalNode(reinit: boolean = false, args: string[]) {
if (process.env.ZKSYNC_ENV != 'ext-node') {
console.warn(`WARNING: using ${process.env.ZKSYNC_ENV} environment for external node`);
console.warn('If this is a mistake, set $ZKSYNC_ENV to "ext-node" or other environment');
Expand Down Expand Up @@ -139,5 +136,5 @@ export const enCommand = new Command('external-node')
.description('start zksync external node')
.option('--reinit', 'reset postgres and rocksdb before starting')
.action(async (cmd: Command) => {
await externalNode(cmd.reinit, cmd.args);
await externalNode(cmd.reinit, cmd.args);
});

0 comments on commit 8d2b5ff

Please sign in to comment.