Skip to content

Commit

Permalink
chore: added dry-run flag to kysor (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Sep 2, 2024
1 parent 06082e7 commit 6256f74
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
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

0 comments on commit 6256f74

Please sign in to comment.