mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main};
|
||||
use swap_or_not_shuffle::{compute_shuffled_index, shuffle_list as fast_shuffle};
|
||||
|
||||
const SHUFFLE_ROUND_COUNT: u8 = 90;
|
||||
|
||||
@@ -46,11 +46,7 @@ fn do_round(seed: &[u8], index: usize, pivot: usize, round: u8, list_size: usize
|
||||
let source = hash_with_round_and_position(seed, round, position);
|
||||
let byte = source[(position % 256) / 8];
|
||||
let bit = (byte >> (position % 8)) % 2;
|
||||
if bit == 1 {
|
||||
flip
|
||||
} else {
|
||||
index
|
||||
}
|
||||
if bit == 1 { flip } else { index }
|
||||
}
|
||||
|
||||
fn hash_with_round_and_position(seed: &[u8], round: u8, position: usize) -> Hash256 {
|
||||
|
||||
Reference in New Issue
Block a user