File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/blockifier/src/execution Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -448,9 +448,9 @@ fn estimate_steps_of_encode_felt252_data_and_calc_blake_hash(
448
448
449
449
/// Returns the number of BLAKE opcodes needed to hash the given felts.
450
450
/// Each BLAKE opcode processes 16 u32s (partial messages are padded).
451
- fn count_blake_opcode ( n_big_felts : usize , n_small_felts : usize ) -> usize {
451
+ fn count_blake_opcode ( felt_size_groups : & FeltSizeCount ) -> usize {
452
452
// Count the total number of u32s to be hashed.
453
- let total_u32s = total_u32s_from_felts ( n_big_felts , n_small_felts ) ;
453
+ let total_u32s = total_u32s_from_felts ( felt_size_groups . large , felt_size_groups . small ) ;
454
454
total_u32s. div_ceil ( FeltSizeCount :: U32_WORDS_PER_MESSAGE )
455
455
}
456
456
@@ -482,7 +482,7 @@ pub fn encode_and_blake_hash_resources(
482
482
483
483
EstimatedExecutionResources :: V2Hash {
484
484
resources,
485
- blake_count : count_blake_opcode ( felt_size_groups. large , felt_size_groups . small ) ,
485
+ blake_count : count_blake_opcode ( felt_size_groups) ,
486
486
}
487
487
}
488
488
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ fn test_zero_inputs() {
37
37
assert_eq ! ( steps, STEPS_EMPTY_INPUT , "Unexpected base step cost for zero inputs" ) ;
38
38
39
39
// No opcodes should be emitted.
40
- let opcodes = count_blake_opcode ( 0 , 0 ) ;
40
+ let opcodes = count_blake_opcode ( & FeltSizeCount { small : 0 , large : 0 } ) ;
41
41
assert_eq ! ( opcodes, 0 , "Expected zero BLAKE opcodes for zero inputs" ) ;
42
42
43
43
// Should result in base cost only (no opcode cost).
You can’t perform that action at this time.
0 commit comments