From 6fb844dcf64fc9293adf6c1a82128187b1a20ead Mon Sep 17 00:00:00 2001 From: royvardhan Date: Thu, 12 Sep 2024 05:31:42 +0530 Subject: [PATCH] fix: use u64::MAX for v --- bins/revme/src/cmd/statetest/models/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bins/revme/src/cmd/statetest/models/mod.rs b/bins/revme/src/cmd/statetest/models/mod.rs index 1b7fc99b7d..8162dc6e26 100644 --- a/bins/revme/src/cmd/statetest/models/mod.rs +++ b/bins/revme/src/cmd/statetest/models/mod.rs @@ -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); @@ -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() }