Skip to content

Commit

Permalink
Remove file existance check
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelBilbao committed Dec 2, 2024
1 parent 2a47728 commit b35528d
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions crates/common/src/signer/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,29 +520,16 @@ mod test {
.join("BLS")
.join(proxy_signer.pubkey().to_string());

assert!(json_path.is_file());
assert!(sig_path.is_file());
assert!(pass_path.is_file());

let keystore: JsonKeystore = serde_json::de::from_str(
&std::fs::read_to_string(
keys_path
.join(consensus_signer.pubkey().to_string())
.join("TEST_MODULE")
.join("bls")
.join(format!("{}.json", proxy_signer.pubkey().to_string())),
)
.unwrap(),
)
.unwrap();
let keystore: JsonKeystore =
serde_json::de::from_str(&std::fs::read_to_string(json_path).unwrap()).unwrap();

assert_eq!(keystore.pubkey, proxy_signer.pubkey().to_string().trim_start_matches("0x"));

let sig = FixedBytes::from_hex(std::fs::read_to_string(sig_path).unwrap());
assert!(sig.is_ok());
assert_eq!(sig.unwrap(), signature);

std::fs::remove_dir_all(tmp_path).unwrap();
assert!(FixedBytes::<32>::from_hex(std::fs::read_to_string(pass_path).unwrap()).is_ok());
}

#[test]
Expand Down

0 comments on commit b35528d

Please sign in to comment.