Skip to content

Commit

Permalink
fix and enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Mar 7, 2024
1 parent 5f2b30f commit 9621117
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/precompile/src/secp256r1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ fn p256_verify(i: &Bytes, target_gas: u64) -> PrecompileResult {
#[cfg(test)]
mod test {
use super::p256_verify;
use revm_primitives::Bytes;
use revm_primitives::{hex::FromHex, Bytes};

#[test]
#[ignore]
fn proper_sig_verify() {
let input = Bytes::from("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e");
let input = Bytes::from_hex("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e").unwrap();
let target_gas = 3_500u64;
let (gas_used, res) = p256_verify(&input, target_gas).unwrap();
assert_eq!(gas_used, 3_450u64);
Expand Down

0 comments on commit 9621117

Please sign in to comment.