Skip to content

Commit b65bd33

Browse files
committed
fix clippy
1 parent 612dce3 commit b65bd33

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ethereum/consensus-core/src/consensus_core.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ fn apply_update_no_quorum_check<S: ConsensusSpec>(
227227
store.optimistic_header = store.finalized_header.clone();
228228
}
229229

230-
if store.finalized_header.beacon().slot % S::slots_per_epoch() == 0 {
230+
if store
231+
.finalized_header
232+
.beacon()
233+
.slot
234+
.is_multiple_of(S::slots_per_epoch())
235+
{
231236
let checkpoint = store.finalized_header.beacon().tree_hash_root();
232237
return Some(checkpoint);
233238
}

ethereum/consensus-core/src/proof.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn is_proof_valid<T: TreeHash>(
9696
let mut hasher = Sha256::new();
9797

9898
for (i, node) in branch.iter().enumerate() {
99-
if (index / 2usize.pow(i as u32)) % 2 != 0 {
99+
if !(index / 2usize.pow(i as u32)).is_multiple_of(2) {
100100
hasher.update(node);
101101
hasher.update(derived_root);
102102
} else {

0 commit comments

Comments
 (0)