Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-shandar committed Jun 18, 2024
1 parent 5de4bef commit b586210
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion blockset-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ mod cdt;
mod common;
mod forest;
mod info;
mod secp256k1;
mod sha2;
mod uint;
mod secp256k1;

pub use app::run;
10 changes: 8 additions & 2 deletions blockset-lib/src/secp256k1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::uint::{u256x::{self, U256}, u512x};
use crate::uint::{
u256x::{self, U256},
u512x,
};

const P: U256 = [
0xFFFFFFFF_FFFFFFFF_FFFFFFFE_FFFFFC2F,
Expand Down Expand Up @@ -272,7 +275,10 @@ mod test {
fn test_mul() {
assert_eq!(Scalar::ZERO.mul(Scalar::MAX), Scalar::ZERO);
assert_eq!(Scalar::ONE.mul(Scalar::ONE), Scalar::ONE);
assert_eq!(Scalar::new([2, 0]).mul(Scalar::new([2, 0])), Scalar::new([4, 0]));
assert_eq!(
Scalar::new([2, 0]).mul(Scalar::new([2, 0])),
Scalar::new([4, 0])
);
assert_eq!(Scalar::MAX.mul(Scalar::MAX), Scalar::ONE);
}
}
5 changes: 1 addition & 4 deletions blockset-lib/src/uint/u128x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ mod test {
37_806_656_864_672
]
);
assert_eq!(
mul(u128::MAX, u128::MAX),
[1, u128::MAX - 1]
);
assert_eq!(mul(u128::MAX, u128::MAX), [1, u128::MAX - 1]);
}

fn check_shl(a: u128, b: i32, expected: u128, f: fn(u128, i32) -> u128) {
Expand Down

0 comments on commit b586210

Please sign in to comment.