Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkolegov committed Apr 5, 2024
1 parent 5426e0a commit 361d43c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion node/libs/crypto/src/bls12_381/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,5 @@ pub enum Error {
SignatureAggregation(BLST_ERROR),
/// Infinity public key.
#[error("Error infinity public key")]
InvalidInfinityPublicKey
InvalidInfinityPublicKey,
}
1 change: 0 additions & 1 deletion node/libs/crypto/src/bls12_381/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::*;
use rand::{rngs::StdRng, Rng, SeedableRng};
use std::iter::repeat_with;
use assert_matches::assert_matches;

// Test signing and verifying a random message
#[test]
Expand Down
7 changes: 4 additions & 3 deletions node/libs/crypto/src/bn254/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ fn signature_smoke() {
#[test]
fn test_decode_zero_secret_key_failure() {
let mut bytes: [u8; 1000] = [0; 1000];
bytes[0]=1; bytes[800]=1;
bytes[0] = 1;
bytes[800] = 1;
SecretKey::decode(&bytes).expect_err("Oversized secret key decoded");

let mut bytes: [u8; 33] = [0; 33];
bytes[0]=1; bytes[32]=1;
bytes[0] = 1;
bytes[32] = 1;
SecretKey::decode(&bytes).expect_err("Oversized 33 bytes secret key decoded");

let bytes: [u8; 31] = [0; 31];
SecretKey::decode(&bytes).expect_err("Undersized secret key decoded");
}


#[test]
fn signature_failure_smoke() {
let mut rng = StdRng::seed_from_u64(29483920);
Expand Down

0 comments on commit 361d43c

Please sign in to comment.