diff --git a/common/protocol/src/index.ts b/common/protocol/src/index.ts index 354541ca..d77ec859 100644 --- a/common/protocol/src/index.ts +++ b/common/protocol/src/index.ts @@ -286,8 +286,8 @@ export class Validator { ) .option( "--dry-run-bundles ", - "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); diff --git a/common/protocol/src/methods/main/runNode.ts b/common/protocol/src/methods/main/runNode.ts index 8d5d8d17..99335c16 100644 --- a/common/protocol/src/methods/main/runNode.ts +++ b/common/protocol/src/methods/main/runNode.ts @@ -96,7 +96,8 @@ export async function runNode(this: Validator): Promise { } } - 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) {