Skip to content

Commit

Permalink
fix: use u64::MAX for v
Browse files Browse the repository at this point in the history
  • Loading branch information
royvardhan committed Sep 12, 2024
1 parent 9998f96 commit 6fb844d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bins/revme/src/cmd/statetest/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use revm::primitives::{
RecoveredAuthorization, Signature, B256, U256,
};
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::{collections::BTreeMap, u64};

#[derive(Debug, PartialEq, Eq, Deserialize)]
pub struct TestSuite(pub BTreeMap<String, TestUnit>);
Expand Down Expand Up @@ -130,7 +130,7 @@ pub struct TestAuthorization {

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

0 comments on commit 6fb844d

Please sign in to comment.