Skip to content

Commit fabf70e

Browse files
committed
feat: check-config command
1 parent dac0a7f commit fabf70e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

stacks-signer/src/cli.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ pub enum Command {
6464
GenerateFiles(GenerateFilesArgs),
6565
/// Generate a signature for Stacking transactions
6666
GenerateStackingSignature(GenerateStackingSignatureArgs),
67+
/// Check a configuration file and output config information
68+
CheckConfig(RunSignerArgs),
6769
}
6870

6971
/// Basic arguments for all cyrptographic and stacker-db functionality

stacks-signer/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ fn handle_generate_stacking_signature(
350350
signature
351351
}
352352

353+
fn handle_check_config(args: RunSignerArgs) {
354+
let config = GlobalConfig::try_from(&args.config).unwrap();
355+
println!("Config: {}", config);
356+
}
357+
353358
/// Helper function for writing the given contents to filename in the given directory
354359
fn write_file(dir: &Path, filename: &str, contents: &str) {
355360
let file_path = dir.join(filename);
@@ -398,6 +403,9 @@ fn main() {
398403
Command::GenerateStackingSignature(args) => {
399404
handle_generate_stacking_signature(args, true);
400405
}
406+
Command::CheckConfig(args) => {
407+
handle_check_config(args);
408+
}
401409
}
402410
}
403411

0 commit comments

Comments
 (0)