Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added dry-run flag to kysor #153

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tools/kysor/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ start
"Specify the path to an .env file which should be used when starting a binary"
)
.option("--debug", "Run the validator node in debug mode")
.option(
"--dry-run",
"Run the node without uploading or voting on bundles so the operator can test his setup before joining as a validator."
)
.option(
"--dry-run-bundles <number>",
"Specify the number of bundles that should be tested before the node properly exits. If zero the node will run indefinitely [default = 0]",
"0"
)
.action(async (options) => {
await run(options);
});
Expand Down
9 changes: 9 additions & 0 deletions tools/kysor/src/kysor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,15 @@ export const run = async (options: any) => {
args.push("--debug");
}

if (options.dryRun) {
args.push("--dry-run");
}

if (options.dryRunBundles > 0) {
args.push("--dry-run-bundles");
args.push(`${options.dryRunBundles}`);
}

if (valaccount.requestBackoff) {
args.push(`--request-backoff`);
args.push(`${valaccount.requestBackoff}`);
Expand Down
Loading