Skip to content

Commit

Permalink
chore: run indefinitely when bundle rounds are zero
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Aug 21, 2024
1 parent bbb1474 commit 7d471f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/protocol/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ export class Validator {
)
.option(
"--dry-run-bundles <number>",
"Specify the number of bundles that should be tested before the node properly exits [default = 10]",
"10"
"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((options) => {
this.start(options);
Expand Down
3 changes: 2 additions & 1 deletion common/protocol/src/methods/main/runNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export async function runNode(this: Validator): Promise<void> {
}
}

if (this.dryRun) {
// exit the node properly if the provided bundle rounds have been reached
if (this.dryRun && this.dryRunBundles > 0) {
const rounds = await this.m.bundles_amount.get();

if (rounds.values[0].value === this.dryRunBundles) {
Expand Down

0 comments on commit 7d471f7

Please sign in to comment.