Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Oct 12, 2024
1 parent f315e87 commit da586b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/precompile/src/secp256r1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ fn p256_verify(input: &Bytes, gas_limit: u64) -> PrecompileResult {
if P256VERIFY_BASE > gas_limit {
return Err(PrecompileErrors::Error(PrecompileError::OutOfGas));
}
let mut result = B256::default();
result.0[31] = (verify_impl(input).is_some()) as u8;
Ok(PrecompileOutput::new(P256VERIFY_BASE, result.into()))
let result = verify_impl(input).is_some();
let out = PrecompileOutput::new(P256VERIFY_BASE, B256::with_last_byte(result as u8).into());
Ok(out)
}

/// Returns `Some(())` if the signature included in the input byte slice is
Expand Down

0 comments on commit da586b6

Please sign in to comment.