File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
ethereum/consensus-core/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments