Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Oct 14, 2024
1 parent 517520a commit a5d8b69
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/blockifier/src/execution/native/syscall_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,6 @@ impl<'state> StarknetSyscallHandler for &mut NativeSyscallHandler<'state> {
current_block: &[u32; 16],
remaining_gas: &mut u128,
) -> SyscallResult<()> {
const SHA256_STATE_SIZE: usize = 8;

self.pre_execute_syscall(
remaining_gas,
SyscallSelector::Sha256ProcessBlock,
Expand All @@ -893,8 +891,7 @@ impl<'state> StarknetSyscallHandler for &mut NativeSyscallHandler<'state> {
.expect(
"u32.to_be_bytes() returns 4 bytes, and data.len() == 16. So data contains 64 bytes.",
);
let mut state: [u32; SHA256_STATE_SIZE] = *prev_state;
sha2::compress256(&mut state, &[data_as_bytes]);
sha2::compress256(prev_state, &[data_as_bytes]);
Ok(())
}
}
Expand Down

0 comments on commit a5d8b69

Please sign in to comment.