Skip to content

Commit

Permalink
feat(audit checks): audit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cong-or committed Oct 5, 2023
1 parent 615a8fb commit 9af8c08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 12 additions & 1 deletion src/audit/src/find/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,15 @@ VOTING_KEY='ca1q0uftf4873xazhmhqrrqg4kfx7fmzfqlm5w80wake5lu3fxjfjxpk6wv3f7'

./target/release/find --key-to-convert $VOTING_KEY

```
```

### Check a batch of keys
```bash

KEY_FILE='/tmp/keyfile.txt'
FRAGMENTS_STORAGE=/tmp/fund9-leader-1/persist/leader-1

./target/release/find --fragments $FRAGMENTS_STORAGE --key-file $KEY_FILE

```

5 changes: 2 additions & 3 deletions src/audit/src/find/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//!

use clap::Parser;
use lib::find::{all_voters, batch_key_check, convert_key_formats, find_vote, read_lines};
use lib::find::{all_voters, batch_key_check, convert_key_formats, find_vote};
use tracing::{info, Level};

use color_eyre::Result;
Expand Down Expand Up @@ -132,8 +132,7 @@ fn main() -> Result<(), Box<dyn Error>> {

if let Some(keyfile) = args.key_file {
let storage_path = PathBuf::from(args.fragments.expect("enforced by clap: infallible"));

batch_key_check(&storage_path, keyfile);
batch_key_check(&storage_path, keyfile)?;
}

if let Some(voting_key) = args.key_to_convert {
Expand Down

0 comments on commit 9af8c08

Please sign in to comment.