Skip to content

Commit

Permalink
chore: add kysor support for debug-max-size
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Apr 3, 2024
1 parent 5eedc9c commit d1cc1ac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/kysor/src/commands/valaccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ valaccounts
"Specify the port of the metrics server. Only considered if '--metrics' is set [default = 8080]",
"8080"
)
.option(
"--debug-max-size <number>",
"Specify the max size in bytes for the debug folder. [default = 10737418240 (10GB)]",
"10737418240"
)
.option("--recover", "Create a valaccount by importing an existing mnemonic")
.action(async (options) => {
try {
Expand Down Expand Up @@ -133,6 +138,7 @@ valaccounts
cache: options.cache,
metrics: options.metrics,
metricsPort: options.metricsPort,
debugMaxSize: options.debugMaxSize,
};

fs.writeFileSync(
Expand Down
5 changes: 5 additions & 0 deletions tools/kysor/src/kysor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ export const run = async (options: any) => {
args.push(`${valaccount.metricsPort}`);
}

if (valaccount.debugMaxSize) {
args.push("--debug-max-size");
args.push(`${valaccount.debugMaxSize}`);
}

logger.info("Starting process ...");

console.log("\n");
Expand Down
1 change: 1 addition & 0 deletions tools/kysor/src/types/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export interface IValaccountConfig {
cache: string;
metrics: boolean;
metricsPort: string;
debugMaxSize: number;
}

0 comments on commit d1cc1ac

Please sign in to comment.