Skip to content

Commit

Permalink
fix: resolve pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
royvardhan committed Sep 11, 2024
1 parent 8c2024d commit 9998f96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bins/revme/src/cmd/statetest/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use deserializer::*;
pub use spec::SpecName;

use revm::primitives::{
AccessList, Address, Authorization, Bytes, HashMap, RecoveredAuthorization, Signature, B256,
U256,
alloy_primitives::Parity, AccessList, Address, Authorization, Bytes, HashMap,
RecoveredAuthorization, Signature, B256, U256,
};
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
Expand Down Expand Up @@ -130,7 +130,8 @@ pub struct TestAuthorization {

impl TestAuthorization {
pub fn signature(&self) -> Signature {
let parity = self.v != U256::ZERO;
let v = u64::try_from(self.v).unwrap();
let parity = Parity::try_from(v).unwrap();
Signature::from_rs_and_parity(self.r, self.s, parity).unwrap()
}

Expand Down

0 comments on commit 9998f96

Please sign in to comment.