Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions consensus/swap_or_not_shuffle/src/shuffle_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ pub fn shuffle_list(
loop {
buf.set_round(r);

let pivot = buf.raw_pivot() as usize % list_size;

let pivot = (buf.raw_pivot() % list_size as u64) as usize;
let mirror = (pivot + 1) >> 1;

buf.mix_in_position(pivot >> 8);
Expand Down
2 changes: 1 addition & 1 deletion consensus/types/src/subnet_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl SubnetId {

let node_id = U256::from_be_slice(&raw_node_id);
// calculate the prefixes used to compute the subnet and shuffling
let node_id_prefix = (node_id >> (NODE_ID_BITS - prefix_bits))
let node_id_prefix = (node_id >> (NODE_ID_BITS - prefix_bits) as u32)
.as_le_slice()
.get_u64_le();

Expand Down